spectrometer2
2.0.0.0
|
Spectrometer 2 Click is a compact add-on board that collects light waves. This board features the VD6283TX, a color sensor with advanced light flicker extraction from STMicroelectronics. The VD6283TX performs fast and accurate light measurements thanks to an individual ADC and a readout for each color channel - red, green, blue, IR, clear, and visible. It uses hybrid color filters with precise responses allowing accurate computation of the correlated color temperature (CCT) and Lux information. Its patented architecture and a high-performance photodiode design can also extract light-flickering frequencies to avoid banding effects or check that they are safe for the human eye.
We provide a library for the Spectrometer 2 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 Spectrometer 2 Click driver.
spectrometer2_cfg_setup
Config Object Initialization function. spectrometer2_init
Initialization function. spectrometer2_default_cfg
Click Default Configuration function. spectrometer2_get_data
This function reads data from 6 ALS channels (Red, Visible, Blue, Green, IR, Clear). spectrometer2_rgbc_to_hsl
This function converts RGBC (red, green, blue, clear) to HSL (hue, saturation, lightness) color value. spectrometer2_get_color
This function returns the color name flag from the input HSL color. This example demonstrates the use of Spectrometer 2 click board by reading data from 6 ALS 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 ALS channels and converts
them to HSL color and displays those data as well as the detected color name on the USB UART every 200ms 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.