|
CodeUC HRI2
v2.0
Microcontroller firmware of the board used during the HRI labs.
|
Driver for a strain gauge. More...
Functions | |
| void | sg_Init (AdcChannel channel) |
| Initialize the strain gauge driver. More... | |
| float32_t | sg_Get (void) |
| Return the measured force on the paddle. More... | |
Driver for a strain gauge.
This driver uses an ADC input, ANIN1 or ANIN2 (see ADC). To use this, connect wire the sensor as this:
Set the sensitivity switches to +-33mV.
Call sg_Init() first in the initialization code. Then, call sg_Get() to get the force.
| float32_t sg_Get | ( | void | ) |
Return the measured force on the paddle.
| The | force applied to the top of the paddle [N]. |
| void sg_Init | ( | AdcChannel | channel | ) |
Initialize the strain gauge driver.
| channel | the ADC channel the strain gauge is wired to (0 or 1). |
1.8.10