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
9872 Discussions

Edison Color Sensor

EEdis
Novice
899 Views

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!

1 Solution
Carlos_M_Intel
Employee
123 Views

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

View solution in original post

1 Reply
Carlos_M_Intel
Employee
124 Views

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

Reply