color2
2.0.0.0
|
Color 2 click carries the ISL29125 RGB color light sensor. It detects red, green and blue in a variety of lighting conditions, outputting 16-bit resolution data in a measuring range from 5.7 m lux to 10,000 lux.
We provide a library for the Color2 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 Color2 Click driver.
void color2_cfg_setup ( color2_cfg_t *cfg );
COLOR2_RETVAL color2_init ( color2_t *ctx, color2_cfg_t *cfg );
void color2_default_cfg ( color2_t *ctx );
void color2_write_data( color2_t *ctx, uint8_t address, uint8_t write_command );
Example demonstrates use of Color 2 click.
The demo application is composed of two sections :
Initialization driver enable's - initialize ISL29125 RGB color light sensor and start write log.
This is a example which demonstrates the use of Color 2 Click board. ISL29125 RGB color light sensor on Color 2 Click, detects red, green and blue in a variety of lighting conditions and outputting 16-bit resolution data on the USBUART. Also read color and check which color is detected by the sensor. If the color is detected, the detected color message is logged on the USBUART. All data logs on usb uart for aproximetly every 3 sec.
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.