Tilt 2 Click Board
Tilt 2 Click Board
The Tilt 2 Click Board™ is a tilt sensor switch, which breaks the circuit when tilted to an angle of 45° or when shaken. It is a single-pole-double-throw type of switch (SPDT), which can be operated with up to 24V. The current through the switch should not exceed 25mA. The Click Board™ is equipped with the the RB-441-45, a 45° rolling ball sensor switch, which uses gold-plated terminals and a gold-plated ball, in order to minimize the contact resistance. The sensor switch is very durable, enclosed in a PBT plastic with very good electric insulation properties. It can be used in any application that relies on sensing a tilt of 45°.
The Tilt 2 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS socket.
Software Support
We provide a library for the Tilt 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.
Library Description
The library contains a tilt detection function.
Key Functions
uint8_t tilt2_tiltDetection()
- Tilt detection.
Example Description
The application is composed of the three sections :
- System Initialization - Sets INT pin as INPUT for tilt detection.
- Application Initialization - Initialization driver init.
- Application Task - (code snippet) - Tilt detection, if the tilt is detected, the message is logs on USBUART.
void applicationTask() { uint8_t tilt; tilt = tilt2_tiltDetection(); if(tilt == _TILT2_TILT_DETECTION) { mikrobus_logWrite(" Tilt detection.. ", _LOG_LINE); Delay_ms( 300 ); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
GPIO
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.
Tilt 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.