tilt3 2.0.0.0
|
Tilt 3 Click is a compact add-on board used for measuring the tilt in multiple axes in relation to an absolute level plane. This board features the DSBA1P, a tilt sensor switch that breaks the circuit when tilted to an angle from ±30° to ±60° from NKK Switches.
We provide a library for the Tilt3 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for Tilt3 Click driver.
tilt3_cfg_setup
Config Object Initialization function. tilt3_init
Initialization function. tilt3_enable_switch
This function enables the tilt switch by setting the EN pin to the high logic state. tilt3_disable_switch
This function disables the tilt switch by setting the EN pin to the low logic state. tilt3_get_switch_state
This function returns the INT pin logic state which indicates the tilt switch state. This example demonstrates the use of Tilt 3 click board.
The demo application is composed of two sections :
Initializes the driver and enables the tilt switch.
As soon as the tilt switch state changes, it displays a corresponding message on the USB UART.
Tilt switches OFF at an angle of 60 degrees minimum and switches ON at the horizontal position (up to 10 degrees). The tilt LED will turn ON when the tilt switch is OFF.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
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. UART terminal is available in all MikroElektronika compilers.