Hello, I am new and I need your help... I have Intel Edison mini board and color sensor TCS3200 and I have to connect it. I don't know how... Can anyone help me? I' ll be really greateful if you can show some example code in C/C++. Thanks in advance!
Link Copied
Hi Joe11,
You can use the mraa and upm libraries.
Using mraa, you will be able to read analog values, take a look at this example:
https://github.com/intel-iot-devkit/mraa/blob/master/examples/c%2B%2B/AioA0.cpp mraa/AioA0.cpp at master · intel-iot-devkit/mraa · GitHub
You can compile by running g++ AioA0.cpp -o output –lmraa
You can find more information about MRAA in:
http://iotdk.intel.com/docs/master/mraa/ mraa: Main Page
https://github.com/intel-iot-devkit/mraa intel-iot-devkit/mraa · GitHub
UPM, has some libraries for some sensors, these libraries uses the MRAA library too. Unfortunately there isn't an example for the TCS3200 but there is an example for the TCS3414cs.
https://github.com/intel-iot-devkit/upm/blob/master/examples/c%2B%2B/tcs3414cs.cxx upm/tcs3414cs.cxx at master · intel-iot-devkit/upm · GitHub
I think this example will give you an idea on how to start. You can compile it by running: g++ tcs3414cs.cxx -o out -lupm-tcs3414cs -I /usr/include/upm/ -lmraa
More information about UPM in:
http://iotdk.intel.com/docs/upm/v0.4.1/ upm: Main Page
https://github.com/intel-iot-devkit/upm intel-iot-devkit/upm · GitHub
Regards,
Charlie
Hi Joe11,
You can use the mraa and upm libraries.
Using mraa, you will be able to read analog values, take a look at this example:
https://github.com/intel-iot-devkit/mraa/blob/master/examples/c%2B%2B/AioA0.cpp mraa/AioA0.cpp at master · intel-iot-devkit/mraa · GitHub
You can compile by running g++ AioA0.cpp -o output –lmraa
You can find more information about MRAA in:
http://iotdk.intel.com/docs/master/mraa/ mraa: Main Page
https://github.com/intel-iot-devkit/mraa intel-iot-devkit/mraa · GitHub
UPM, has some libraries for some sensors, these libraries uses the MRAA library too. Unfortunately there isn't an example for the TCS3200 but there is an example for the TCS3414cs.
https://github.com/intel-iot-devkit/upm/blob/master/examples/c%2B%2B/tcs3414cs.cxx upm/tcs3414cs.cxx at master · intel-iot-devkit/upm · GitHub
I think this example will give you an idea on how to start. You can compile it by running: g++ tcs3414cs.cxx -o out -lupm-tcs3414cs -I /usr/include/upm/ -lmraa
More information about UPM in:
http://iotdk.intel.com/docs/upm/v0.4.1/ upm: Main Page
https://github.com/intel-iot-devkit/upm intel-iot-devkit/upm · GitHub
Regards,
Charlie
For more complete information about compiler optimizations, see our Optimization Notice.