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]
Rating:
Author: MIKROE
Last Updated: 2019-01-28
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: Pushbutton/Switches
Downloaded: 7105 times
Not followed.
License: MIT license
Tamper click is equipped with SDS001, a low profile side-actuated detect switch, made by C&K company. The click is additionally equipped with the RC filter that minimizes the bouncing effect, making this click a reliable solution for any contact detection application.
Do you want to subscribe in order to receive notifications regarding "Tamper click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Tamper click" changes.
Do you want to report abuse regarding "Tamper click".
Library Description
The library covers all the necessary functions of Tamper Click board.
Tamper click communicates with the target board through the INT line.
This library detect the state of switch on Tamper click, which is normally open.
Key functions:
uint8_t tamperState()
- Function showes the state of the switch.Examples description
The application is composed of the three sections :
void applicationTask() { switchState = tamperState(); if ( switchState == 1 && switchStateOld == 0 ) { mikrobus_logWrite( " Closed ", _LOG_LINE ); mikrobus_logWrite( "- - - - - - - - -", _LOG_LINE ); switchStateOld = 1; } if ( switchState == 0 && switchStateOld == 1 ) { mikrobus_logWrite( " Open ", _LOG_LINE ); mikrobus_logWrite( "- - - - - - - - -", _LOG_LINE ); switchStateOld = 0; } }
Other mikroE Libraries used in the example:
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.