Color 3 Click Board
Color 3 Click Board
Overview
The Color 3 Click Board™ is a MikroBUS add-on board with a TCS3771 colour sensor (also known as a light-to-digital converter) and a narrow beam Infrared LED. The circuit can also function as a proximity sensor.
TCS3771 is a RGBC sensor: it can detect Red, Green, Blue and clear light. The IC performs well under a variety of lighting conditions. For example, it can be covered with different attenuation materials.
As a proximity sensor it has a large dynamic range of operation. It can take short distance measurements behind dark glass; or it can be configured for longer distance measurement, for example, human presence detection in front of monitors or laptops.
For power-saving, TCS3771 has an internal state machine that can put the device into a low power mode between successive RGBC and proximity measurements.
TCS3771 is also fast enough to give off proximity information at a high rate of repetition. This makes it useful for proximity detection in portable devices (such as a phone coming near to a speaker's ear).
The Color 3 Click Board™ communicates with the target MCU through the mikroBUS™ I2C interface, with additional functionality provided by an INT pin. Designed to use a 3.3 power supply only.
The following code snippet shows how to send temperature readings from the Color 3 Click Board™ to a TFT display.
1 void main() 2 { 3 //Local Declarations 4 uint8_t _i2c_address = 0x29; 5 color_t my_color; 6 7 // GPIOs 8 GPIO_Digital_Input( &GPIOD_BASE, _GPIO_PINMASK_10 ); 9 Delay_ms(300); 10 11 // I2C 12 I2C1_Init_Advanced( 100000, &_GPIO_MODULE_I2C1_PB67 ); 13 Delay_ms(300); 14 15 //Color 3 16 color_3_init( _i2c_address ); 17 Delay_ms(300); 18 19 color_3_get_rgb_data( &my_color ); 20 21 while(1) 22 { 23 24 } 25 }
Code examples that demonstrate the usage of the Color 3 Click Board™ with MikroElektronika hardware, written for mikroC for ARM, AVR, dsPIC, FT90x, PIC and PIC32 are available on Libstock
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.