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 (137112 times)
  2. FAT32 Library (70239 times)
  3. Network Ethernet Library (56129 times)
  4. USB Device Library (46444 times)
  5. Network WiFi Library (42080 times)
  6. FT800 Library (41408 times)
  7. GSM click (29124 times)
  8. mikroSDK (26567 times)
  9. PID Library (26504 times)
  10. microSD click (25491 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: 2005 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

Magneto 14 click

0

Magneto 14 Click is a compact add-on board with an accurate and reliable magnetic device. This board features the MA735, a contactless angle sensor with ABZ, and PWM output from Monolithic Power Systems. The MA735 sensor has a 9-bit to 13-bit resolution of the absolute angle encoder.

[Learn More]

AudioMUX click

0

AudioMUX click is a sound processing Click board™ with digital controls, based on the TDA7468D IC. It can be used to select one of four audio input channels, adjust its frequency response and volume, and send it to the output.

[Learn More]

LTE IoT 2 click

5

LTE IoT 2 click is a Click board that allows connection to the LTE networks, featuring Quectel BG96 LTE module, which offers two LTE technologies aimed at Machine to Machine communication (M2M) and Internet of Things (IoT).

[Learn More]