Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,103 Views

how to use this library..._Edison_yocto linux_APDS-9960 RGB and Gesture Sensor

Jump to solution

i will use SparkFun_APDS_9960 RGB and Gesture Sensor

but this library is Arduino library

 

i want to use Edison in Yocto linux

 

 

how to use this library?

 

 


Accepted Solutions
Highlighted
Employee
20 Views

Hello edison_esl,

As you mentioned, this library was specifically written for Arduino, so it will only compile when it is used in this environment. However, the library was written in C++ so, it is possible to port it to be used with the GPP compiler with some probably major modifications.

You might be able to write a new library based on this one. You will need to create new '.h' and '.cpp' files but this time you will need to do it without the Arduino specific parts. You will have to remove the Arduino.h and Wire.h parts and instead use a more general C++ library but keeping all its functions and definitions.

In order to interact with the GPIO and have access to I2C, you could use the MRAA library and implement it on your new library. Unfortunately this is the only way you will be able to use this library on the Linux side of Edison. This may prove challenging but it would be an interesting project.

Peter.

View solution in original post

0 Kudos
1 Reply
Highlighted
Employee
21 Views

Hello edison_esl,

As you mentioned, this library was specifically written for Arduino, so it will only compile when it is used in this environment. However, the library was written in C++ so, it is possible to port it to be used with the GPP compiler with some probably major modifications.

You might be able to write a new library based on this one. You will need to create new '.h' and '.cpp' files but this time you will need to do it without the Arduino specific parts. You will have to remove the Arduino.h and Wire.h parts and instead use a more general C++ library but keeping all its functions and definitions.

In order to interact with the GPIO and have access to I2C, you could use the MRAA library and implement it on your new library. Unfortunately this is the only way you will be able to use this library on the Linux side of Edison. This may prove challenging but it would be an interesting project.

Peter.

View solution in original post

0 Kudos