TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 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 (137081 times)
  2. FAT32 Library (70223 times)
  3. Network Ethernet Library (56095 times)
  4. USB Device Library (46418 times)
  5. Network WiFi Library (42032 times)
  6. FT800 Library (41378 times)
  7. GSM click (29109 times)
  8. mikroSDK (26557 times)
  9. PID Library (26487 times)
  10. microSD click (25486 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: 3117 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

Gyro 9 click

0

Gyro 9 Click is a compact add-on board that contains a high-performance gyroscope. This board features the A3G4250D, a MEMS motion sensor from STMicroelectronics. It is a low-power 3-axes digital output gyroscope that provides unprecedented stability at zero rate level and sensitivity over temperature and time and is equipped with an embedded temperature sensor. The gyroscope has a 16-bit rate value data output with an 8-bit compensation temperature data output.

[Learn More]

DC MOTOR click

0

This application change the speed and direction of DC Motor

[Learn More]

UNIQUE ID click

0

Unique ID click carries DS2401, an enhanced silicon serial number IC. It’s a low cost solution for providing a unique registration number to your design.

[Learn More]