TOP Contributors

  1. MIKROE (2649 codes)
  2. Alcides Ramos (350 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 (136496 times)
  2. FAT32 Library (69706 times)
  3. Network Ethernet Library (55813 times)
  4. USB Device Library (46151 times)
  5. Network WiFi Library (41791 times)
  6. FT800 Library (40973 times)
  7. GSM click (28918 times)
  8. PID Library (26379 times)
  9. mikroSDK (26264 times)
  10. microSD click (25290 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

Color 10 click

Rating:

5

Author: MIKROE

Last Updated: 2020-02-28

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Optical

Downloaded: 1929 times

Not followed.

License: MIT license  

Color 10 Click is carrying VEML3328 sensor for RGB and IR light sensing as well as the RGB diode incorporated on the board which makes it good color detection device when its combined with a white LED.

No Abuse Reported

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

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

Do you want to report abuse regarding "Color 10 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Color 10 Click

Color 10 Click

Native view of the Color 10 Click board.

View full image
Color 10 Click

Color 10 Click

Front and back view of the Color 10 Click board.

View full image

Library Description

Library provides functions for reading color registers from device. Converting data to HSL color data, and automaticly reading predefined colors;

Key functions:

  • uint16_t color10_generic_read ( uint8_t cmd_addr ); - Generic read function from device
  • float color10_get_color_value ( void ); - Functions for read HSL color value
  • uint8_t color10_get_color ( float color_value ); - Functions for detecting colors from HSL value

Examples description

The application is composed of three sections :

  • System Initialization - Inicializes I2C module
  • Application Initialization - Initialization driver init, checks device ID and sets default configuration
  • Application Task - Reads color IR ADC value and then checks for predefined colors with write_color funcion
void application_task ( )
{
    uint16_t read_data;
    float color_data;

    read_data = color10_generic_read( COLOR10_CMD_REG_IR );
    WordToStr( read_data, demo_txt );
    mikrobus_logWrite( " - IR value: ", _LOG_TEXT );
    mikrobus_logWrite( demo_txt, _LOG_LINE );

    mikrobus_logWrite( " - Color: ", _LOG_TEXT );
    write_color( );
    
    mikrobus_logWrite( " *************** ", _LOG_LINE );
    Delay_ms( 1000 );
}


Additional Functions :

  • void write_color ( float color_val ) - Reads and gets color HSL value and then checks for the color and logs a few predefined colors

Other mikroE Libraries used in the example:

  • I2C
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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

ROTARY B click

0

Rotary B click carries a 15-pulse incremental rotary encoder with detents, surrounded by a ring of 16 blue LEDs. It’s a perfect solution for adding a precision input knob to your design. The encoder outputs A and B signals (out of phase to each other); the knob also acts as a push-button which sends an interrupt to the target board MCU. The LED ring is controlled through SPI lines (CS, SCK, MISO, MOSI). Rotary click™ can be used with either a 3.3V or 5V power supply.

[Learn More]

STSPIN233 click

0

STSPIN233 click is a complete solution for a 3-phase integrated motor driver, based on the STSPIN233, Low voltage 3-phase integrated motor driver.

[Learn More]

AM/FM click

0

AM/FM Click is a RADIO RECEIVER click board™ that can be used to listen to music from the AM and FM radio bands.

[Learn More]