TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137099 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56124 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42077 times)
  6. FT800 Library (41387 times)
  7. GSM click (29116 times)
  8. mikroSDK (26562 times)
  9. PID Library (26489 times)
  10. microSD click (25487 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

Spectral click

Rating:

5

Author: MIKROE

Last Updated: 2018-03-26

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Optical

Downloaded: 3083 times

Not followed.

License: MIT license  

Spectral click is a light multispectral sensing device, which uses the state-of-the-art sensor IC for a very accurate true-color sensing. Spectral click provides a direct reading of the XYZ color coordinates, consistent with the CIE 1931 2. standard color space.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Spectral click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Spectral click" changes.

Do you want to report abuse regarding "Spectral click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)

mikroSDK Library Blog

Spectral click

Spectral click

Native view of the Sprectral click board.

View full image
Spectral click

Spectral click

Front and back view of the Spectral click board.

View full image

Library Description

Library initializes and defines UART driver and functions witch offer a choice to providing direct XYZ color coordinates consistent with the CIE 1931.

  1. Standard Observer color coordinates. It also maps the XYZ coordinates to the x, y (Y) of the 2-dimensional color gamut and scales the coordinates to the CIE 1976 u’v’ coordinate system. The library provides accurate Correlated Color Temperature (CCT) measurements and provides color point deviation from the black body curve for white light color in the delta u’ v’ coordinate system. Check documentation for more details.


Key functions:

  • void spectral_getColor_Data(uint8_t *rsp, uint8_t *) - Reads calibrated X, Y, and Z color data.
  • void spectral_getXYsmall_Data(uint8_t *rsp, uint8_t *xyData) - Reads calibrated x and y for CIE 1931 color gamut.
  • uint8_t spectral_getLUX_Data(uint8_t *rsp) - Reads calibrated LUX value from the sensor.
  • uint8_t spectral_getCCT_Data(uint8_t *rsp) - Reads calibrated CCT value from the sensor.
  • void spectral_getUV_Data(uint8_t *rsp, uint16_t *uvData) - Reads calibrated u’, v’ and u, v for CIE 1976 color gamut.

Examples Description

The demo application is composed of three sections:

  • System Initialization - Initializes all necessary GPIO pins, UART used for
    the communcation with Spectral and UART used for infromation logging.
  • Application Initialization - Initializes driver, reset module and sends
    command for the default module configuration.
  • Application Task - (code snippet) - Sends the command to start reading data.
    Then logs to USBUART, six read values every 1 second.
void applicationTask()
{
 spectral_process();

 spectral_cmdSingle(&cmdData[0]);
 spectral_getData(&dataBuffer[0],&readData[0]);
 IntToStr(readData[0],text);
 mikrobus_logWrite( "-- X value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[1],text);
 mikrobus_logWrite( "-- Y value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[2],text);
 mikrobus_logWrite( "-- Z value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[3],text);
 mikrobus_logWrite( "-- NIR value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[4],text);
 mikrobus_logWrite( "-- D value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[5],text);
 mikrobus_logWrite( "-- C value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 mikrobus_logWrite( "---------------------", _LOG_LINE );

 Delay_1sec();
}

Along with the demo application timer initialization functions are provided. Note that the timer is configured acording to the default develoment system and MCUs, changing the system or MCU may require an update of the timer init and timer ISR functions.

mikroE Libraries used in the example:

  • String
  • Conversions
  • UART

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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

GNSS 13 click

0

GNSS 13 Click is a compact add-on board that provides positioning, navigation, and timing services. This board features the LG77LICMD, a global-region standard-precision GNSS module from Quectel Wireless Solutions. This module utilizes concurrent reception of up to three GNSS systems (GPS, GLONASS (or BeiDou), and Galileo), maximizing position availability, especially under challenging conditions such as deep urban canyons. By combining EASY™ (Embedded Assist System), an advanced AGNSS feature, with GLP (GNSS Low Power), a low-power mode, the LG77LICMD module achieves high performance, low power consumption, and fully meets industrial standards. It also has a configurable host interface, anti-jamming technology, and a multi-tone active interference canceller.

[Learn More]

Flash 12 click

0

Flash 12 Click is a compact add-on board representing a highly reliable memory solution. This board features the AT25EU0041A, a 4Mbit serial flash memory from Renesas, known for its ultra-low power consumption. This Click board™ is specifically designed to address the needs of systems operating at the IoT network's edge, providing an optimal solution for program code storage and execution directly from NOR Flash memory. It stands out for its innovative erase architecture, offering short erase times and low power consumption across operations, including reading, programming, and erasing.

[Learn More]

LDC 1101 click

0

LDC1101 click is an inductance-to-digital converter Click Board. It is designed for a range of different applications, based on the inductivity measurements.

[Learn More]