TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136548 times)
  2. FAT32 Library (69740 times)
  3. Network Ethernet Library (55846 times)
  4. USB Device Library (46184 times)
  5. Network WiFi Library (41803 times)
  6. FT800 Library (40992 times)
  7. GSM click (28926 times)
  8. PID Library (26385 times)
  9. mikroSDK (26287 times)
  10. microSD click (25301 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: 4054 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

Joystick click

0

Joystick click is a smart navigation key concept based on contactless, magnetic movement detection.

[Learn More]

STSPIN820 click

0

STSPIN820 click is a stepper motor driver with the PWM current control, selectable microstepping up to 256 microsteps, and a wide voltage range. It is based on the STSPIN820, a stepper motor driver from STSPIN8 series. Designed to be a bullet-proof solution for the new wave of demanding industrial applications, it integrates two full-bridges with low ON resistance, the control logic, and a full set of protection features, in a small 4x4mm QFN package. Its output stage implements the PWM current control with the fixed OFF time. The device can be used with the step motor voltage ranging from 7V up to 45V, and current up to 1.5A per bridge.

[Learn More]

Thunder click

0

Thunder click features AS3935 lightning sensor as well as MA5532 coil antenna. It detects the presence and proximity of potentially hazardous lightning activity in the vicinity and provides estimated distance to the center of the storm. It can also provide information on the noise level. Thunder click communicates with the target board microcontroller via SPI and INT lines. The board is designed to use 3.3V or 5V power supply. LED diode (GREEN) indicates the presence of power supply.

[Learn More]