force 2.0.0.0
|
Force click is a mikroBUS™ add-on board with circuitry for implementing Interlink Electronics’ Force Sensing Resistors into your projects (with a single zone force sensing resistor included with the click). The Force Sensing Resistor is a thin sensor made of two membranes that are separated by a spacer around the edges.
We provide a library for the Force 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Force Click driver.
- Initialization function.void force_cfg_setup ( force_cfg_t *cfg );
FORCE_RETVAL force_init ( force_t *ctx, force_cfg_t *cfg );
void force_default_cfg ( force_t *ctx );
- This function calculates resistance data based on the ADC input.force_data_t force_generic_read ( force_t *ctx );
float force_get_resistance ( uint32_t adc_value );
force_get_correction_factor ( float temperature, float humidity );
This example showcases how to initialize and configure the logger and click modules and read and display ADC voltage data read from the analog pin.
The demo application is composed of two sections :
This function initializes and configures the logger and click modules.
This function reads and displays ADC voltage data from the analog pin every second.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.