TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 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 (139248 times)
  2. FAT32 Library (71743 times)
  3. Network Ethernet Library (57115 times)
  4. USB Device Library (47428 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28073 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: 2146 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

Cap Extend Click

0

Cap Extend Click is a mikroBUS add-on board with a SEMTECH SX8633 low power, capacitive button touch controller. It has 12 pins for connecting capacitive inputs (either touch-buttons or proximity sensors).

[Learn More]

THERMO Click

0

THERMO Click features the MAX31855K thermocouple-to-digital converter as well as PCC-SMP connector for K-type thermocouple probes. The Click is designed to run on a 3.3V power supply.

[Learn More]

Microwave 5 Click

0

Microwave 5 Click is a compact add-on board that utilizes the Doppler Shift Phenomenon to sense motion. This board features the PD-V10-G5, a miniature X-band microwave transceiver from Ningbo Pdlux Electronic Technology. The transmitter on this transceiver works on a 10.525GHz frequency over the patch antenna, with a 2-4kHz pulse repetition frequency. The strength of the sensor’s output, in other words, the detection range, depends on the Signal-to-Noise ratio.

[Learn More]