TOP Contributors

  1. MIKROE (2752 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 (139064 times)
  2. FAT32 Library (71594 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 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 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: 4555 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

Air quality Click

0

Air quality Click carries an MQ-135 sensor for detecting poisonous gases that impact air quality in homes and offices. The Click is designed to run on a 5V power supply. It communicates with the target microcontroller over the AN pin on the mikroBUS™ line.

[Learn More]

LED Driver 11 Click

0

LED Driver 11 Click is a compact add-on board that simplifies the control of multiple LEDs. This board features the WLMDU9456001JT (172946001), a fully integrated constant current LED driver with the buck switching regulator and inductor in a single package from Würth Elektronik.

[Learn More]

IR Distance click

1

IR distance click carries Sharp’s GP2Y0A60SZ0F distance measuring sensor. The sensor module comprises an integrated PSD (position sensitive detector), an infrared LED and a signal processing circuit. The measuring range is between 10 and 150 cm.The board is designed to use either a 3.3V or a 5V power supply.

[Learn More]