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 (136950 times)
  2. FAT32 Library (70063 times)
  3. Network Ethernet Library (56015 times)
  4. USB Device Library (46333 times)
  5. Network WiFi Library (41953 times)
  6. FT800 Library (41264 times)
  7. GSM click (29050 times)
  8. mikroSDK (26473 times)
  9. PID Library (26445 times)
  10. microSD click (25408 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 6 click

Rating:

5

Author: MIKROE

Last Updated: 2018-07-18

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Proximity

Downloaded: 4042 times

Followed by: 1 user

License: MIT license  

Proximity 6 click is a versatile proximity detection device on a Click board. It can detect a foreign object distanced up to 20cm.

No Abuse Reported

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

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

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

Proximity 6 click

Native view of the Proximity 6 click board.

View full image
Proximity 6 click

Proximity 6 click

Front and back view of the Proximity 6 click board.

View full image

Library Description

This library provides generic functions for working with the Click board.

Key functions:

  • uint8_t proximity6_writeReg( uint8_t register_address, uint16_t transfer_data ) - The function writes 16-bit data to the register.
  • uint8_t proximity6_setMode( uint8_t selectMode ) - The function puts the device in the desired operating mode.
  • void proximity6_getPosition( uint8_t *position ) - The function reads proximity data and checks from which side the object (body) effects on the sensor.
  • uint8_t proximity6_displayData( uint8_t *dataValue, uint8_t setResolution ) - The function shows proximity data values in determined resolution as graphics view.

Examples Description

The application is composed of three sections:

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization -  Sets the registers in a default state and configures the device to work in proper operating mode (Proximity Mode).
  • Application Task - (code snippet) - Example can show the data register values as graphic view in desired resolution. Also can determine from which side the object (body) effects on the sensor and logs results on USB UART. Results will be shown only when one or more data registers are updated with the new value (sensor detects the change).
void applicationTask()
{
 proximity6_logPositionRes();
}

Additional functions:

  • void proximity6_logGraphicRes() - The function logs on USB UART results from the data proximity registers as graphic view.
  • void proximity6_logPositionRes() - The function logs on USB UART the position of the object which affects the sensor.

Other mikroE Libraries used in the example:

  • I2C
  • UART

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

Button Y click

5

Button Y is a Click board equipped with the tactile switch, sometimes referred to as a pushbutton. A pushbutton is a component that is used very often in various designs, allowing the user to interact with the application.

[Learn More]

Charger 16 click

0

Charger 16 Click is a compact add-on board that represents a single-cell battery charger. This board features the LT1571, a constant-current/constant-voltage battery charger with preset voltage and termination flag from Analog Devices.

[Learn More]

Charger 12 click

5

Charger 12 Click is a single lithium-ion (Li+) cell or three-cell NiMH/NiCd battery charger. This click can be used for Low-Cost Li-Ion battery chargers, or Power Tools, toys, backup energy storage solutions, etc.

[Learn More]