Basic class for reading SPTE 10 bar 0-5V analog pressure sensor made by Festo
Dependents: heros_leg_readout_torque_addition heros_leg_readout_torque_addition_V3 DROPSAWTestRigCode_V4
SPTEPressureSensor Class Reference
Reading and nulling the SPTE pressure sensor made by festo (analog input) Based on Martijn Grootens' LCM101 class. More...
#include <SPTEPressureSensor.h>
Public Member Functions | |
SPTEPressureSensor (PinName pin_a_in, float offset, float factor) | |
float | getPressureRaw () |
float | getPressure () |
void | nullPressure () |
sets pressure scaling offset so that current output is pressure zero | |
float | get_offset () |
float | get_factor () |
Detailed Description
Reading and nulling the SPTE pressure sensor made by festo (analog input) Based on Martijn Grootens' LCM101 class.
Definition at line 25 of file SPTEPressureSensor.h.
Constructor & Destructor Documentation
SPTEPressureSensor | ( | PinName | pin_a_in, |
float | offset, | ||
float | factor | ||
) |
- Parameters:
-
pin_a_in,: PinName of analog input offset,: of analog value read from the sensor(calibration data) factor,: multiplication factor for analog value read from the sensor(calibration data)
Definition at line 33 of file SPTEPressureSensor.h.
Member Function Documentation
float get_factor | ( | ) |
- Returns:
- factor multiplication factor for analog value
Definition at line 73 of file SPTEPressureSensor.h.
float get_offset | ( | ) |
- Returns:
- offset of analog value
Definition at line 68 of file SPTEPressureSensor.h.
float getPressure | ( | ) |
- Returns:
- force value kOffset_ + kFactor_ * getPressureRaw();
Definition at line 51 of file SPTEPressureSensor.h.
float getPressureRaw | ( | ) |
- Returns:
- unscaled analog input value
Definition at line 43 of file SPTEPressureSensor.h.
void nullPressure | ( | ) |
sets pressure scaling offset so that current output is pressure zero
Definition at line 59 of file SPTEPressureSensor.h.
Generated on Sat Jul 30 2022 17:59:06 by 1.7.2