Library for reading out the LCM 101 sensor and also usable for S610 loadcells

Fork of LCM101 by Martijn Grootens

Embed: (wiki syntax)

« Back to documentation index

Lcm101 Class Reference

Lcm101 Class Reference

Simple class to read out an LCM101 S-beam force sensor connected to an analog input. More...

#include <lcm101.h>

Public Member Functions

 Lcm101 (PinName pin_a_in, float offset, float factor)
float getForceRaw ()
float getForce ()
float get_offset ()
float get_factor ()

Detailed Description

Simple class to read out an LCM101 S-beam force sensor connected to an analog input.

Definition at line 10 of file lcm101.h.


Constructor & Destructor Documentation

Lcm101 ( PinName  pin_a_in,
float  offset,
float  factor 
)
Parameters:
pin_a_inPinName of analog input
offsetof analog value (calibration data)
factormultiplication factor for analog value (calibration data)

Definition at line 18 of file lcm101.h.


Member Function Documentation

float get_factor (  )
Returns:
factor multiplication factor for analog value

Definition at line 51 of file lcm101.h.

float get_offset (  )
Returns:
ffset of analog value

Definition at line 46 of file lcm101.h.

float getForce (  )
Returns:
force value kOffset_ + kFactor_ * getForceRaw();

Definition at line 36 of file lcm101.h.

float getForceRaw (  )
Returns:
unscaled analog input value

Definition at line 28 of file lcm101.h.