Color 15 Click Board
Color 15 Click Board
Key Features:
- Low power consumption, parallel output for red, green, blue, white and infrared, high resolution and sensitivity, works well under different light source conditions, programmable interrupt, and more
- Based on the CLS-16D24-44-DF8/TR8 - color light sensor from Everlight Electronics
- Can be used for automatic residential and commercial lighting management, contrast enhancement, detection of ambient for backlight control, and more
- mikroBUS: I2C Interface
The Color 15 Click Board™ 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. This Click board™ is suitable for automatic residential and commercial lighting management, contrast enhancement, detection of ambient for backlight control, and more.
The Color 15 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Software Support
We provide a library for the Color 15 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Library Description
This library contains API for the Color 15 Click Board™ driver.
Key functions
-
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.
Example Description
This example demonstrates the use of the 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.
void application_task ( void )
{
// Wait for the data ready interrupt indication
while ( color15_get_int_pin ( &color15 ) );
color15_channels_t channels;
if ( ( COLOR15_OK == color15_clear_interrupt ( &color15 ) ) &&
( COLOR15_OK == color15_get_data ( &color15, &channels ) ) )
{
color15_hsl_t hsl;
color15_rgbw_to_hsl ( &color15, &channels, &hsl );
log_printf ( &logger, "rn Hue: %.1f degrn", hsl.hue );
log_printf ( &logger, " Saturation: %.1f %%rn", hsl.saturation );
log_printf ( &logger, " Lightness: %.1f %%rn", hsl.lightness );
switch ( color15_get_color ( &hsl ) )
{
case COLOR15_RED_COLOR:
{
log_printf( &logger, " Color: REDrn" );
break;
}
case COLOR15_YELLOW_COLOR:
{
log_printf( &logger, " Color: YELLOWrn" );
break;
}
case COLOR15_GREEN_COLOR:
{
log_printf( &logger, " Color: GREENrn" );
break;
}
case COLOR15_CYAN_COLOR:
{
log_printf( &logger, " Color: CYANrn" );
break;
}
case COLOR15_BLUE_COLOR:
{
log_printf( &logger, " Color: BLUErn" );
break;
}
case COLOR15_MAGENTA_COLOR:
{
log_printf( &logger, " Color: MAGENTArn" );
break;
}
case COLOR15_WHITE_COLOR:
{
log_printf( &logger, " Color: WHITErn" );
break;
}
case COLOR15_BLACK_COLOR:
{
log_printf( &logger, " Color: BLACKrn" );
break;
}
default:
{
log_printf( &logger, " Color: UNKNOWNrn" );
break;
}
}
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Other MikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Color15
Additional Notes and Information
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.
MIKROSDK
The Color 15 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Color 15 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.