3 Replies Latest reply on Jan 21, 2015 9:11 AM by Intel_Alvarado

    Native i2c sensor driver for edison

    hanumant

      HI

       

      I am trying to create a project with the edison and a gesture sensor.

      I did not find a driver for the gesture sensor yet APDS 9960.

      There is I believe Arduino library for it, but I want to use this with the mini board.

      So I have decided to implement it under the yocto BSP.

       

      I wanted some feedback on whats the right approach

       

      Thanks

      Hanumant

        • 1. Re: Native i2c sensor driver for edison
          Intel_Alvarado

          Hi hanumant,

           

          When using this kind of sensors, I’d recommend you to choose a sensor which has libraries that are compatible with the device you want to use. In this case the best approach would be to find a python library that allows you to use the sensor. Using a python library will allow you to just import the library you need to use to your board .You can also try using the Arduino library found here https://github.com/sparkfun/APDS-9960_RGB_and_Gesture_Sensor and adapt to see if it works with the Edison, but you would need to modify it first, since it was built for a different hardware. You can use the code as an example of how you should build your own code but you can try and adapt it to your needs, however I have not tested it. Take a look at https://communities.intel.com/docs/DOC-23158 for the Edison Hardware guide and see some information related to I2C.

           

          Regards

          Sergio

          • 2. Re: Native i2c sensor driver for edison
            hanumant

            Thanks for the response.

            i have infact looked at the library, however the library does not provide a way for you to detect that a gesture is available.

            ie the arduino sketch that use the library must also install an interrupt handler in order to detect a gesture.

            So porting the library as is to the edison BSP without an underlying kernel driver to actual handle gesture interrupts and

            signal the event for processing may not be possible?

            Please correct me if I am wrong?

            If this is correct however, then I would like to understand what would be the preferred way to design the driver.

            As an input device maybe?

            • 3. Re: Native i2c sensor driver for edison
              Intel_Alvarado

              Hi hanumant,

               

              I believe that there is no driver required, you just need to access the i2c bus of the board via Linux and enable if from there. Take a look at the hardware guide posted above and try this suggestion. Let us know your results.

               

              Regards

              Sergio