TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (385 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139847 times)
  2. FAT32 Library (72210 times)
  3. Network Ethernet Library (57392 times)
  4. USB Device Library (47740 times)
  5. Network WiFi Library (43364 times)
  6. FT800 Library (42700 times)
  7. GSM click (29981 times)
  8. mikroSDK (28442 times)
  9. PID Library (26989 times)
  10. microSD click (26398 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 11 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.6

mikroSDK Library: 2.0.0.0

Category: Optical

Downloaded: 103 times

Not followed.

License: MIT license  

Color 11 Click is a compact add-on board that provides an accurate color-sensing solution. This board features the TCS34083M, an ALS/color sensor with selective flicker detection from ams-OSRAM. The sensor features ambient light and color (RGB) sensing and flicker detection, which suppresses cross-coupling from 940nm IR if generated by adjacent circuits. The main benefits of this sensor are invisible ALS and color sensing under any glass type, unique fast ALS integration mode, and more. It features configurable programmable gain and integration time, tailored ALS and color response, ALS/color interrupt with thresholds, and many more.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Color 11 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Color 11 Click" changes.

Do you want to report abuse regarding "Color 11 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Color 11 Click

Color 11 Click is a compact add-on board that provides an accurate color-sensing solution. This board features the TCS34083M, an ALS/color sensor with selective flicker detection from ams-OSRAM. The sensor features ambient light and color (RGB) sensing and flicker detection, which suppresses cross-coupling from 940nm IR if generated by adjacent circuits. The main benefits of this sensor are invisible ALS and color sensing under any glass type, unique fast ALS integration mode, and more. It features configurable programmable gain and integration time, tailored ALS and color response, ALS/color interrupt with thresholds, and many more.

color11_click.png

Click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Sep 2023.
  • Type : I2C type

Software Support

We provide a library for the Color 11 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for Color 11 Click driver.

Standard key functions :

  • color11_cfg_setup Config Object Initialization function.

    void color11_cfg_setup ( color11_cfg_t *cfg );
  • color11_init Initialization function.

    err_t color11_init ( color11_t *ctx, color11_cfg_t *cfg );
  • color11_default_cfg Click Default Configuration function.

    err_t color11_default_cfg ( color11_t *ctx );

Example key functions :

  • color11_get_als_data Color 11 get ALS data function.

    err_t color11_get_als_data ( color11_t *ctx, color11_als_data_t *als_data );
  • color11_get_illuminance Color 11 get illuminance function.

    err_t color11_get_illuminance ( color11_t *ctx, float *lux );
  • color11_get_data_valid_status Color 11 get data valid status function.

    err_t color11_get_data_valid_status ( color11_t *ctx, uint8_t *status );

Example Description

This library contains API for the Color 11 Click driver. The demo application sets sensor configuration and reads and displays ALS data measurement results.

The demo application is composed of two sections :

Application Init

Initialization of I2C module and log UART. After the driver init, the app executes a default configuration.

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    color11_cfg_t color11_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    color11_cfg_setup( &color11_cfg );
    COLOR11_MAP_MIKROBUS( color11_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == color11_init( &color11, &color11_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( COLOR11_ERROR == color11_default_cfg ( &color11 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
    log_printf( &logger, " ------------------\r\n" );
    Delay_ms ( 100 );
}

Application Task

This example demonstrates the use of the Color 11 Click board™. Reads and displays the results of the ALS data measurements. Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void ) 
{   
    uint8_t status = 0;
    if ( COLOR11_OK == color11_get_data_valid_status( &color11, &status ) )
    {
        color11_als_data_t color_data;
        if ( COLOR11_OK == color11_get_als_data( &color11, &color_data ) && ( COLOR11_STATUS2_AVALID & status ) )
        {
            log_printf( &logger, " Clear: %u\r\n", color_data.clear );
            log_printf( &logger, " Red : %u\r\n", color_data.red );
            log_printf( &logger, " Green : %u\r\n", color_data.green );
            log_printf( &logger, " Blue : %u\r\n", color_data.blue );
            log_printf( &logger, " Wideband : %u\r\n", color_data.wideband );
            log_printf( &logger, " Flicker : %u\r\n", color_data.flicker );
            log_printf( &logger, " ------------------\r\n" );
            Delay_ms ( 1000 );
        }
    }
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Color11

Additional notes and informations

Depending on the development board you are using, you may need USB UART Click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

GSM 5 Click

0

GSM 5 Click is a compact add-on board representing a compact GSM cellular network communication solution. This board features the SARA-G450, a GSM/GPRS quad-band cellular module certified and approved by the main regulatory bodies and operators from u-blox. It features class 12 GSM/GPRS connectivity in the popular u-blox SARA form factor and comes with a comprehensive feature set, including an extensive set of internet protocols designed to provide fully integrated access to u-blox GNSS positioning with embedded A-GPS (AssistNow Online and AssistNow Offline) functionality. Besides a data rate up to 85.6 kbps and an advanced jamming detection feature, this board also offers a high-quality integrated audio interface allowing voice communication.

[Learn More]

USB CDC MSC Demo

0

The application demonstrates USB CDC functionality.

[Learn More]

Thermo 24 Click

0

Thermo 24 Click is a compact add-on board that contains the 4th generation temperature sensing solution from Sensirion. This board features the STS40, a high-accuracy ultra-low-power temperature sensor. The STS40 integrates a digital temperature sensor with a 16-bit analog-to-digital converter (ADC), a data processing circuit, and serial interface logic functions in one package. Characterized by its high accuracy (up to ±0.2°C typical) and high resolution of 0.01°C, this temperature sensor provides temperature data to the host controller with a configurable I2C interface.

[Learn More]