TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 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 (139254 times)
  2. FAT32 Library (71751 times)
  3. Network Ethernet Library (57122 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42404 times)
  7. GSM click (29835 times)
  8. mikroSDK (28078 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: 4601 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

Thermostat Click

0

If you need a temperature sensor and relay in one device, you should look no further than Thermostat Click. It can be used to measure environmental temperature and to directly switch ON/OFF cooling and heating devices, performing all the functions of a thermostat.

[Learn More]

PIR 3 Click

0

PIR 3 Click is a compact add-on board designed for efficient and reliable motion detection in various applications. This board features the ZDP323B1 sensor from Zilog (Littelfuse), with high EMI immunity and precise motion detection capabilities. It includes a spectral filter window tuned to an 8-13um wavelength, dual sensing elements with a 0.6mm spacing, and a field of view of 148° on the X-axis and 136° on the Y-axis. The board also integrates the ZNCL10S PIR lens for maximum IR transmissivity and includes the Click Snap feature for flexible implementation.

[Learn More]

FRAM 2 Click

0

FRAM 2 Click carries a ferroelectric RAM module. Ferroelectric RAM, also known as FRAM, is a non-volatile memory type, with characteristics comparable to much faster DRAM memory modules.

[Learn More]