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.
void color3_cfg_setup ( color3_cfg_t *cfg );
COLOR3_RETVAL color3_init ( color3_t *ctx, color3_cfg_t *cfg );
float color3_get_color_value ( color3_t *ctx );
void color_3_get_crgb_data ( color3_t *ctx, uint16_t *clear_data, uint16_t *red_data, uint16_t *green_data, uint16_t *blue_data );
void color3_set_default_settings ( color3_t *ctx );
This application return the color of object.
The demo application is composed of two sections :
Initalizes I2C driver, applies default settings and makes an initial log.
This example demonstrates the use of Color 3 Click board. It reads
reflected color values and displays the results on USART terminal.
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.