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

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: 2110 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

MagAccel Click

0

Mag&Accel Click is a compact add-on board representing a moving object and magnetic switch as a single solution. This board features the NMH1000, a Hall-effect magnetic field switch, and the FXLS8974CF, a 3-axis low-g accelerometer, both from NXP Semiconductor.

[Learn More]

Temp-Log 7 Click

0

Temp-Log 7 Click is a compact add-on board used to measure and record the temperature of an environment over time. This board features the TMP1826, a high-accuracy, 1-Wire® compatible digital output temperature sensor from Texas Instruments with integrated 2-kbit EEPROM. It supports a wide operating temperature range from –20°C to +85°C with its high accuracy of ±0.1°C (typical)/±0.3°C (maximum) and comes with a factory-programmed 64-bit unique identification number for addressing and NIST traceability. Besides a programmable alarm function that outputs an interrupt signal to the MCU when a specific temperature event occurs, it also has three digital I/O pins configurable for general purposes or to identify the device's position on a shared bus.

[Learn More]

Accel 28 Click

0

Accel 28 Click is a compact add-on board that contains an acceleration sensor. This board features the LIS2HH12TR, an ultra-low-power high-performance three-axis accelerometer from STMicroelectronics. It allows selectable full-scale acceleration measurements in ranges of ±2g, ±4g, and ±8g in three axes with a configurable host interface that supports both SPI and I2C serial communication.

[Learn More]