Tamper 2 Click Board
Tamper 2 Click Board
The Tamper 2 Click Board™ contains a levered D2HW-A221D switch by Omron, which outputs a signal in both positions - pressed and released. Omron switches, also known as microswitches, are well renowned for their reliability and endurance. The PCB of this Click Board™ is designed so that the lever of the microswitch is easily accessible, making the Click Board™ useful for all kinds of different applications, where precise, two-position switches are required. Both the NO (Normally Open) and NC (Normally Closed) pins of the microswitch are routed to mikroBUS, so it can be easily connected to the microcontroller.
Switches of this kind are widely used in many different applications. The most common use of Tamper 2 Click Board™ is door opening or closing detection, detecting the end of travel of a linear actuator, a Morse code input device and so on.
Software Support
We provide an example for the Tamper 2 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Example Description
The application is composed of three sections :
- System Initialization - Initializes UART module used for data logging
- Application Initialization - Initializes Tamper 2 click GPIO pins
- Application Task - Check the state of both GPIO pins and reports current state by logging information to UART
void Tamper_2_click_Task() { if (TAMPER_ON_STATE == 1) { UART0_Write_text("Tamper 2 click is in ON statern"); } if (TAMPER_OFF_STATE == 1) { UART0_Write_text("Tamper 2 click is in OFF statern"); } Delay_ms(500); }
The example code for all architectures and compilers, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- 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.
Tamper 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.