Home » Programacion » Facilino » Facilino Ejemplo » Detecting Colours with TCS3200 sensor

Detecting Colours with TCS3200 sensor

In this post we show how to detect and classify colours using TCS3200 colour sensor and Facilino.

Facilino uses simple instructions to detect colours with the TCS3200 sensor. Internally, the instruction uses a SVM that has been trained to classify colours. These instructions require Facilino’s license.

The aim is to detect and classify up to 11 colours. The name of the detected colour must be shown on the console.

Circuit

Here we show the proposed circuit so that the TCS3200 sensor is connected to D3-D7 Arduino Nano pins. In particular pins S0-S3 are connected to D3-D6 and pin OUT is connected to D7.

 

Facilino

Here you can find the solution of the example. First we need to detect the colour and this value is uses as argument of the colour classifier. In this example we are able to detect up to 11 different colours.

Here we show the expected result: