TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136701 times)
  2. FAT32 Library (69916 times)
  3. Network Ethernet Library (55929 times)
  4. USB Device Library (46254 times)
  5. Network WiFi Library (41882 times)
  6. FT800 Library (41140 times)
  7. GSM click (28975 times)
  8. PID Library (26407 times)
  9. mikroSDK (26353 times)
  10. microSD click (25351 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: 3097 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

CAP Slider 2 click

5

CAP Slider 2 click is a capacitive touch sensor with XY cross shaped electrodes integrated on a Click board.

[Learn More]

SolidSwitch 2 click

0

SolidSwitch 2 Click is a compact add-on board that contains a load switching device. This board features the L9026, an automotive eight-channel relay driver from STMicroelectronics. The L9026 incorporates two high-side drivers and six configurable high-side/low-side drivers driven by an SPI interface or by two dedicated parallel inputs. Operating from an external power supply from 3V up to 18V, it provides a maximum current of 1A on its output terminals. It also offers advanced diagnostic and protection features such as short-to-ground, open load, overcurrent, and overtemperature detections.

[Learn More]

LEM click

6

LEM click carries the LTS 6-NP current transducer and MCP3201 ADC converter. The click can measure AC and DC current with exceptional speed, up to 200 KHz. LEM click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over SPI interface.

[Learn More]