|
HRI board firmware
v2.1
Microcontroller firmware of the board used during the HRI labs.
|
Driver for a Hall-effect angular sensor. More...
Functions | |
| void | hall_Init (AdcChannel channel) |
| Initialize the hall sensor driver. More... | |
| float32_t | hall_GetVoltage (void) |
| Return the Hall sensor output voltage. More... | |
Driver for a Hall-effect angular sensor.
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 +-10V.
Call hall_Init() first in the initialization code. Then, call hall_Get() to get the angle of the paddle.
| float32_t hall_GetVoltage | ( | void | ) |
Return the Hall sensor output voltage.
| void hall_Init | ( | AdcChannel | channel | ) |
Initialize the hall sensor driver.
| channel | the ADC channel the hall sensor is wired to (0 or 1). |
1.8.13