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: 2020-03-30
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Force
Downloaded: 2483 times
Not followed.
License: MIT license
Force 2 Click is a mikroBUS add-on board with circuitry for implementing Honeywell’s FSS-SMT Series force sensors into your projects (with a single zone force sensing resistor included with the click).
Do you want to subscribe in order to receive notifications regarding "Force 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Force 2 click" changes.
Do you want to report abuse regarding "Force 2 click".
Library Description
The library covers all the necessary functions to control Force 2 click board.
Key functions:
force2_adc_set_in_channel( );
- Function sets input channel.force2_adc_init( );
- Function initializes ADC.force2_adc_read( );
- Function reads ADC values.Examples description
The application is composed of three sections :
void application_task ( )
{
adc_val = force2_adc_read( );
disp_val = force2_val_conv( adc_val, 4095, 15, 0 );
ByteToStr( disp_val, log_txt );
Ltrim( log_txt );
mikrobus_logWrite( "Force: ", _LOG_TEXT );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( "N", _LOG_LINE );
mikrobus_logWrite( "-------------------", _LOG_LINE );
Delay_ms( 500 );
}
force2_val_conv ( uint32_t x, uint32_t in_max, uint32_t out_min, uint32_t out_max )
- re-maps ADC value to force value in newton.force2_adc_set_in_channel( );
- Function sets input channel.force2_adc_init( );
- Function initializes ADC.force2_adc_read( );
- Function reads ADC values.Other mikroE Libraries used in the example: