1 Reply Latest reply on Oct 14, 2015 9:37 AM by Intel_Peter

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

    edison_esl

      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. Re: how to use this library..._Edison_yocto linux_APDS-9960 RGB and Gesture Sensor
          Intel_Peter

          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.