Use your forum account to login.

LOGIN

TOP Contributors

  1. MikroElektronika Team (585 codes)
  2. Shawon Shahryiar (250 codes)
  3. Alcides Ramos Zambrano (127 codes)
  4. Dany (66 codes)
  5. S P (63 codes)
  6. MikroBUS.NET Team (35 codes)
  7. NART SCHINACKOW (34 codes)
  8. FOURNET Olivier (25 codes)
  9. Alberto Trasimeni (25 codes)
  10. Roman Toropov (25 codes)

Most Downloaded

  1. Timer Calculator (85622 times)
  2. FAT32 Library (41615 times)
  3. Network Ethernet Library (40849 times)
  4. USB Device Library (31421 times)
  5. Network WiFi Library (29514 times)
  6. FT800 Library (23047 times)
  7. PID Library (20197 times)
  8. GSM click (20008 times)
  9. microSD click - Example (16811 times)
  10. GPS click - Example (13490 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
Library

Proximity 3 Click

Rating:

Author: MikroElektronika Team

Last Updated: 2018-05-17

Category: Measurement

Downloaded: 592 times

Not followed.

Proximity 3 click is an intelligent proximity and light sensing device, which features the VCNL4100 sensor from Vishay - high sensitivity long distance proximity sensor (PS), ambient light sensor (ALS) and 940 nm IRED, all in one small package.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Proximity 3 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Proximity 3 Click" changes.

Do you want to report abuse regarding "Proximity 3 Click".

  • Information
  • Comments (0)
Download

Download Library [1.84MB]

Version 1.0.0.0

DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for PIC
  • 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 PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
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 PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic 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 PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Library Blog

Proximity 3 click

Proximity 3 click

Native view of the Proximity 3 click board.

View full image
Proximity 3 Click

Proximity 3 Click

Front and back view of the Proximity 3 click board.

View full image

Library Description

This library contains a set of functions, necessary to work with the Proximity 3 click.

Key functions

uint16_t prox3_readALS() - Reads value from ALS register

uint16_t prox3_readPS() - Reads value from PS register

uint16_t prox3_getDistance() - Calculating distance

uint16_t prox3_getIlluminance() - Calculating illuminance

Examples Description

This is a simple demonstration of sensor functionality, where the user can read the distance and illuminance data from Proximity 3 click. Distance and illuminance values are sent via UART.

The application is composed of three sections:

  • System Initialization - I2C and UART module initialization
  • Application Initialization - Sends HAL pointers, and initializes the VCNL4200
  • Application Task - Sequencial reading of the distance, proximity and ambient light data from the sensor and logging it to UART, every second
void applicationTask()
{
// DISTANCE READ AND CONVERT VALUE TO STRING
    resultPS = prox3_getDistance();
    IntToStr( resultPS, txt1 );
    
// WRITES INFORMATION TO UART
    UART1_Write_Text( "Proximity: ~ " );
    UART1_Write_Text( txt1 );
    UART1_Write_Text( " cmrn" );
    
// AMBIENT LIGHT READ AND CONVERT VALUE TO STRING
    resultALS = prox3_getIlluminance();
    IntToStr( resultALS, txt2 );

// WRITES INFORMATION TO UART
    UART1_Write_Text( "Ambient Light: " );
    UART1_Write_Text( txt2 );
    UART1_Write_Text( " luxrn" );
    
    Delay_ms(1000);
}

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • Conversions

Additional notes and information

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. 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

Hall current 2 Click

Hall current 2 click is a very accurate current measurement Click board, which relies on the Hall effect. The maximum current which can be measured with the Hall current 2 ranges from -12A to +12A, with optimized precision.

[Learn More]

7seg click - Example

This is a simple wheel of fortune game made to demonstrate use of 7seg click. Wait for intro to finish, after that you can start your wheel with a press on RC7 button. Press RC7 button again and try to catch snake eyes (00) ;)

[Learn More]

RTD click

RTD click is based on MAX31865 resistance to digital converter from Maxim Integrated, optimized for platinum resistance temperature detectors, or RTD. The click uses the PT100 type platinum probe for temperature measurement.

[Learn More]