TOP Contributors

  1. MIKROE (2751 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139058 times)
  2. FAT32 Library (71588 times)
  3. Network Ethernet Library (56988 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29767 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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: 2254 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

ADC Click

1

ADC Click carries the MCP3204 12-bit Analog-to-Digital converter. The Click is designed to run on 3.3V by default. Place PWR SEL SMD jumper to 5V position if used with 5V systems.

[Learn More]

DMX Click

0

DMX Click is a device used to establish communication between the MCU and equipment that uses the DMX512-A communication protocol.

[Learn More]

Temp-Hum 9 click

5

Temp-Hum 9 click is a smart temperature and humidity sensing click board, packed with features that allow simple integration into any design.

[Learn More]