spectrometer
2.0.0.0
|
Spectrometer Click features an 11-channel spectrometer for spectral identification and color matching applications. This Click board™ features the AS7341 from AMS-AG, whose spectral response is defined in the wavelengths from approximately 350nm to 1000nm.
We provide a library for the Spectrometer 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 Spectrometer Click driver.
void spectrometer_cfg_setup ( spectrometer_cfg_t *cfg );
SPECTROMETER_RETVAL spectrometer_init ( spectrometer_t *ctx, spectrometer_cfg_t *cfg );
void spectrometer_def_cfg ( spectrometer_t *ctx );
void spectrometer_raw_rd_val_mode_1 ( spectrometer_t *ctx, uint8_t *adc_data );
void spectrometer_raw_rd_val_mode_2 ( spectrometer_t *ctx, uint8_t *adc_data );
uint8_t spectrometer_flicker_detection ( spectrometer_t *ctx );
This Click is an 11-channel spectrometer for spectral identification and color matching. The spectral response is defined in the wavelengths from approximately 350nm to 1000nm. 8 optical channels cover the visible spectrum, one channel can be used to measure near infra-red light and one channel is a photo diode without filter (“clear”). The device also integrates a dedicated channel to detect 50Hz or 60Hz ambient light flicker.
The demo application is composed of two sections :
Initalizes I2C driver, performs safety check and makes an initial log.
This example shows the capabilities of the Spectrometer click by reading out channels with SMUX configrations 1 and 2, detecting flicker for 100 and 120 Hz and displaying data via 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.