Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9868 Discussions

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

kbae
Novice
1,198 Views

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?

 

 

1 Solution
Pedro_M_Intel
Employee
115 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

1 Reply
Pedro_M_Intel
Employee
116 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

Reply