color15
2.0.0.0
|
Color 15 Click is a compact add-on board representing an accurate color sensing solution. This board features the CLS-16D24-44-DF8/TR8, a low power, high sensitivity, color light sensor from Everlight Electronics. This Click boardâ„¢, with an I2C configurable color sensor, senses red, green, blue, white (RGBW), and infrared light and converts them to digital values. The RGBW sensor is designed to reject IR in light sources allowing the device to operate in environments from sunlight to dark rooms. The integrating ADC rejects 50Hz and 60Hz flickers caused by artificial light sources.
We provide a library for the Color 15 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for Color 15 Click driver.
color15_cfg_setup
Config Object Initialization function. color15_init
Initialization function. color15_default_cfg
Click Default Configuration function. color15_get_data
This function reads data from 5 channels (Red, Green, Blue, White, IR). color15_rgbw_to_hsl
This function converts RGBW (red, green, blue, white) to HSL (hue, saturation, lightness) color value. color15_get_color
This function returns the color name flag from the input HSL color. This example demonstrates the use of Color 15 click board by reading data from 5 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.
Waits for the data ready interrupt, then 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
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. UART terminal is available in all MikroElektronika compilers.