TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136986 times)
  2. FAT32 Library (70099 times)
  3. Network Ethernet Library (56023 times)
  4. USB Device Library (46344 times)
  5. Network WiFi Library (41961 times)
  6. FT800 Library (41274 times)
  7. GSM click (29051 times)
  8. mikroSDK (26489 times)
  9. PID Library (26447 times)
  10. microSD click (25411 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

Proximity 8 click

Rating:

5

Author: MIKROE

Last Updated: 2019-04-08

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Proximity

Downloaded: 3109 times

Not followed.

License: MIT license  

Proximity 8 click is a close-range proximity sensing Click board, equipped with the VCNL36687S, a very accurate and power-efficient proximity sensor (PS) with VCSEL.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Proximity 8 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Proximity 8 click" changes.

Do you want to report abuse regarding "Proximity 8 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

Proximity 8 click

Proximity 8 click

Native view of the Proximity 8 click board.

View full image
Proximity 8 click

Proximity 8 click

Front and back view of the Proximity 8 click board.

View full image

Library Description

The library provides all the necessary functions for reading registers and writing data to the registers.

Key functions:

  • void proximity8_writeData(uint8_t reg, uint16_t dataIn) - Function for writing data into the register.
  • uint16_t proximity8_readData(uint8_t reg) - Function for reads data from register.
  • uint8_t proximity8_getInterruptState() - Get interrupt state on the INT pin.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes I2C module and sets INT pin as INPUT.
  • Application Initialization - Initialization Driver init, test comunication and configuration chip for measurement.
  • Application Task - Reads Proximity data and this data logs to the USBUART every 1500ms.

Note: The reading value and proximity of the data depend on the configuration.

void applicationTask()
{
   uint16_t Proximity;
   char demoText[ 50 ] = {0};
   
   Proximity = proximity8_readData(_PROXIMITY8_REG_PROX_DATA);
   Proximity = (Proximity & 0x7FFF);

   IntToStr(Proximity, demoText);
   mikrobus_logWrite(" Proximity data: ", _LOG_TEXT);
   mikrobus_logWrite(demoText, _LOG_LINE);
   
   mikrobus_logWrite("-------------------------", _LOG_LINE);
   Delay_ms( 1500 );
}

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • Conversions

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

Ambient 15 click

0

Ambient 15 Click is a compact add-on board used to measure the amount of the present ambient light. This board features the TSL2584TSV, a very-high sensitivity light-to-digital converter with an I2C interface that transforms light intensity into a digital output signal from AMS-AG. The TSL2584TSV’s near-photopic response produces a highly accurate lux measurement up to 33klx even when mounted behind dark glass. Filtering out unwanted IR light enables the sensor to measure the ambient light more accurately, thus producing a near-photopic response.

[Learn More]

ECG 5 click

0

ECG 5 click can be used for the development of ECG and Heart-Rate (HR) applications. The Click board™ features the AD8232, an integrated bio-signal front end. This IC has many features necessary for providing accurate ECG measurements, including very high common-mode rejection ratio, high gain with DC blocking capability, adjustable high-pass and low-pass filters, integrated right leg drive (RLD), etc.

[Learn More]

IR Grid click

5

IR Grid click is a thermal imaging sensor. It has an array of 64 very sensitive factory calibrated IR elements (pixels), arranged in 4 rows of 16 pixels, each measuring an object temperature up to 300ËšC within its local Field of View (FOV).

[Learn More]