TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 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 (137036 times)
  2. FAT32 Library (70167 times)
  3. Network Ethernet Library (56037 times)
  4. USB Device Library (46360 times)
  5. Network WiFi Library (41977 times)
  6. FT800 Library (41305 times)
  7. GSM click (29079 times)
  8. mikroSDK (26519 times)
  9. PID Library (26452 times)
  10. microSD click (25449 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

Light mix-sens click

Rating:

5

Author: MIKROE

Last Updated: 2020-07-14

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Optical

Downloaded: 1761 times

Not followed.

License: MIT license  

Light mix-sens Click is carrying TMD37253, an advanced proximity measurement, color sense (RGBC+IR), and digital ambient light sensing (ALS) device. The TMD37253 slim module package has been designed to accommodate a “single hole” aperture approach that incorporates an IR LED and factory calibrated LED driver.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Light mix-sens click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Light mix-sens click" changes.

Do you want to report abuse regarding "Light mix-sens 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

Light mix-sens Click

Light mix-sens Click

Native view of the Light mix-sens Click board.

View full image
Light mix-sens Click

Light mix-sens Click

Front and back view of the Light mix-sens Click board.

View full image

Library Description

This library allows user to perform a communication with the Light mix-sens Click board. The user can measure the full spectral of light together with proximity measurement. By switching an IR diode, one of two possible IR measurements can be executed, the level of IR light can be measured, or the proximity, together with the all other channels. For more details, please, check the full documentation.

Key functions:

  • lightmixsens_err_t lightmixsens_write_byte( uint8_t reg_addr, uint8_t data_in ); - This function writes data byte to the selected register.
  • lightmixsens_err_t lightmixsens_read_byte( uint8_t reg_addr, uint8_t *data_out ); - This function reads data byte from the selected register.
  • void lightmixsens_switch_ir_to_green( void ); - This function switches the IR light to be measured in the Green channel (GDATA) register.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes all necessary peripherals and pins.
  • Application Initialization - Initializes I2C driver and performs the Click board default configuration to allow ALS/Color and Proximity measurements.
  • Application Task - (code snippet) - Waits until ALS/Color integration cycle was done and then reads the entire measurement. The all results will be sent to the selected UART terminal.
void application_task( )
{
    lightmixsens_wait_atime( );
    
    lightmixsens_read_word( LIGHTMIXSENS_REG_CDATA, &lightmixsens_cdata );
    lightmixsens_read_word( LIGHTMIXSENS_REG_RDATA, &lightmixsens_rdata );
    lightmixsens_read_word( LIGHTMIXSENS_REG_GDATA_IRDATA, &lightmixsens_gdata );
    lightmixsens_read_word( LIGHTMIXSENS_REG_BDATA, &lightmixsens_bdata );
    lightmixsens_read_byte( LIGHTMIXSENS_REG_PDATA, &lightmixsens_pdata );
    
    WordToStr( lightmixsens_cdata, log_txt );
    Ltrim( log_txt );
    mikrobus_logWrite( "- Clear light:  ", _LOG_TEXT );
    mikrobus_logWrite( log_txt, _LOG_TEXT );
    mikrobus_logWrite( " lx", _LOG_LINE );
    
    WordToStr( lightmixsens_rdata, log_txt );
    Ltrim( log_txt );
    mikrobus_logWrite( "- Red light:    ", _LOG_TEXT );
    mikrobus_logWrite( log_txt, _LOG_TEXT );
    mikrobus_logWrite( " lx", _LOG_LINE );
    
    WordToStr( lightmixsens_gdata, log_txt );
    Ltrim( log_txt );
    mikrobus_logWrite( "- Green light:  ", _LOG_TEXT );
    mikrobus_logWrite( log_txt, _LOG_TEXT );
    mikrobus_logWrite( " lx", _LOG_LINE );
    
    WordToStr( lightmixsens_bdata, log_txt );
    Ltrim( log_txt );
    mikrobus_logWrite( "- Blue light:   ", _LOG_TEXT );
    mikrobus_logWrite( log_txt, _LOG_TEXT );
    mikrobus_logWrite( " lx", _LOG_LINE );
    
    prox_app( );
    mikrobus_logWrite( "** Proximity:   ", _LOG_TEXT );
    mikrobus_logWrite( log_txt, _LOG_LINE );
    
    mikrobus_logWrite( "", _LOG_LINE );
}


Additional Functions :

  • prox_app - This is application function which determines the proximity results.

Other mikroE Libraries used in the example:

  • Conversions
  • C_String
  • I2C
  • UART

Additional notes and informations

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

microSD click

0

Need more additional memory? We've got just the thing for you - microSD click. It features a microSD card slot for microSD cards used as a mass storage media for portable devices. microSD click is designed to run on 3.3V power supply. Industry standard SPI interface ensures simple communication at high data rates. Use it for reading or storing data like music, text files, videos and more.

[Learn More]

Nano GPS 2 click

5

Nano GPS 2 Click features the smallest GPS module with an integrated patch antenna, the ORG1510-MK05 a module from OriginGPS. It’s the world’s smallest multi-constellation antenna module enabling high-performance in a variety of applications.

[Learn More]

ADAC 2 click

0

ADAC 2 Click is a compact add-on board providing the ADC/DAC combo solution. This board features the MAX22000, a 24-bit ADC, an 18-bit DAC, and an analog front-end (AFE) from Analog Devices. It allows users to create a software-configurable (SPI interface) input/output that supports all standard industrial analog interfaces: -10V to +10V analog input or output, -20mA to +20mA analog input or output, as well as an RTD or thermocouple input for temperature measurement.

[Learn More]