HRI board firmware v2.1 Microcontroller firmware of the board used during the HRI labs.

Functions
Driver / Hall sensor

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...

## Detailed Description

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:

- hall red -> +5V (pin 1 or 5 of J2).
- hall yellow -> GND (pin 2 or 6 of J2).
- hall blue -> ANINX+ (pin 3 or 7 of J2).
- GND (pin 2 or 6 of J2) -> ANINX- (pin 4 or 8 of J2).

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.

## Function Documentation

## ◆ hall_GetVoltage()

float32_t hall_GetVoltage | ( | void |  | ) |

Return the Hall sensor output voltage.

Returns
  The Hall sensor output voltage [V].

## ◆ hall_Init()

void hall_Init | ( | AdcChannel | channel | ) |

Initialize the hall sensor driver.

Parameters

  channel | the ADC channel the hall sensor is wired to (0 or 1).