color3
2.0.0.0
|
Color 3 click is a mikroBUS™ add-on board with a TCS3771 color sensor (also known as a light-to-digital converter) and a narrow beam Infrared LED. The circuit can also function as a proximity sensor
We provide a library for the Color3 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Color3 Click driver.
color3_cfg_setup
Config Object Initialization function. color3_init
Initialization function. color3_get_rgbc_data
This function reads data from 4 channels (Red, Green, Blue, Clear). color3_rgbc_to_hsl
This function converts RGBC (red, green, blue, clear) to HSL (hue, saturation, lightness) color value. color3_get_color
This function returns the color name flag from the input HSL color. This example demonstrates the use of Color 3 click board by reading data
from RGBC channels and converting them to HSL color and displaying those data as well as the detected color name on the USB UART.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration.
Reads the values of all channels and converts them to HSL color and displays those data
as well as the detected color name on the USB UART every 500ms approximately.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.