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 (137090 times)
  2. FAT32 Library (70234 times)
  3. Network Ethernet Library (56112 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42053 times)
  6. FT800 Library (41384 times)
  7. GSM click (29111 times)
  8. mikroSDK (26560 times)
  9. PID Library (26489 times)
  10. microSD click (25486 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 6 click

Rating:

5

Author: MIKROE

Last Updated: 2018-06-25

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Optical

Downloaded: 4122 times

Not followed.

License: MIT license  

Color 6 click is a very accurate color sensing Click board which features the AS73211, an XYZ true color sensor from ams.

No Abuse Reported

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

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

Do you want to report abuse regarding "Color 6 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 FT90x
  • 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 FT90x
  • 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 FT90x
  • 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 6 click

Color 6 click

Native view of the Color 6 click board.

View full image
Color 6 click

Color 6 click

Front and back view of the Color 6 click board.

View full image

Library Description

The library initializes and defines the I2C bus driver and drivers that offer a choice for writing data in the register. The library includes the function for configuration chip for measurement, functions for reading temperature, channel (X or Y or Z) data. The user also has the function float color6_convertingToEe(uint8_t channel, uint16_t MRES_data) which converts channel data to Ee (Input light irradiance regarding to the photodiode’s area within the conversion time interval) data.

Key functions:

  • uint16_t color6_readData(uint8_t reg) - Functions for reading data from register
  • float color6_convertingToEe(uint8_t channel, uint16_t MRES_data) - Functions for converting channel data to Ee data.
  • void color6_goToMeasurementMode() - Functions for go to measurement mode.
  • float color6_getTemperature() - Functions for reading temperature in ℃.

Example description

The application is composed of three sections:

  • System Initialization - Initializes I2C module.
  • Application Initialization - Initializes driver init and configuration chip for measurement.
  • Application Task - (code snippet) - Reads values from the X / Y / Z channel and converts to Ee (input light irradiance regarding the photodiode’s area within the conversion time interval) data. This data logs on USB UART every 2 seconds.
void applicationTask()
{
 mikrobus_logWrite(" Channel X : ",_LOG_TEXT);
 X_data = color6_readData(_COLOR6_MREG_MEASUREMENT_X_CHANNEL );
 IntToStr(X_data, dataText);
 mikrobus_logWrite(dataText, _LOG_LINE);

 mikrobus_logWrite(" Ee X channel data: ",_LOG_TEXT);
 Ee_data = color6_convertingToEe(_COLOR6_MREG_MEASUREMENT_X_CHANNEL, X_data);
 FloatToStr(Ee_data, dataText);
 mikrobus_logWrite(dataText, _LOG_LINE);

 mikrobus_logWrite(" Channel Y : ",_LOG_TEXT);
 Y_data = color6_readData(_COLOR6_MREG_MEASUREMENT_Y_CHANNEL );
 IntToStr(Y_data, dataText);
 mikrobus_logWrite(dataText, _LOG_LINE);

 mikrobus_logWrite(" Ee Y channel data: ",_LOG_TEXT);
 Ee_data = color6_convertingToEe(_COLOR6_MREG_MEASUREMENT_Y_CHANNEL, Y_data);
 FloatToStr(Ee_data, dataText);
 mikrobus_logWrite(dataText, _LOG_LINE);

 mikrobus_logWrite(" Channel Z : ",_LOG_TEXT);
 Z_data = color6_readData(_COLOR6_MREG_MEASUREMENT_Z_CHANNEL );
 IntToStr(Z_data, dataText);
 mikrobus_logWrite(dataText, _LOG_LINE);

 mikrobus_logWrite(" Ee Z channel data: ",_LOG_TEXT);
 Ee_data = color6_convertingToEe(_COLOR6_MREG_MEASUREMENT_Z_CHANNEL, Z_data);
 FloatToStr(Ee_data, dataText);
 mikrobus_logWrite(dataText, _LOG_LINE);

 mikrobus_logWrite(" Temperature : ",_LOG_TEXT);
 temperature = color6_getTemperature();
 FloatToStr(temperature, dataText);
 mikrobus_logWrite(dataText, _LOG_LINE);

 mikrobus_logWrite(" ",_LOG_LINE);
 Delay_ms( 2000 );
}


Other MikroElektronika libraries used in the example:

  • Conversions
  • I2C
  • UART

Additional notes and information

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

Pressure 8 click

0

Pressure 8 Click is an accurate and fully calibrated pressure sensor, equipped with the MPR series integrated piezoresistive silicon pressure sensor IC.

[Learn More]

Tamper click

0

Tamper click is equipped with SDS001, a low profile side-actuated detect switch, made by C&K company. This is a high-quality, low-current detection switch, which is designed in a form of a push button. The switch itself is very small - only 2mm of switch overtravel length, which coupled with its low actuation force, makes it ideal for using it as a contact detector in various applications - consumer electronics devices, medical devices, smart card detection and similar applications.

[Learn More]

Pressure 11 click

0

This sensor offers many benefits, including low power consumption, high resolution of the pressure data, embedded thermal compensation, FIFO buffer with several operating modes, temperature measurement, etc.

[Learn More]