CodeUC HRI2 v2.0 Microcontroller firmware of the board used during the HRI labs.

- Main Page
- Modules
- Data Structures
- Files

Functions
Driver / Tachometer

Driver for a tachometer. More...

## Functions
void | tac_Init (AdcChannel channel)
| Initialize the tachometer driver. More...
float32_t | tac_Get (void)
| Return the measured paddle angular speed. More...

## Detailed Description

Driver for a tachometer.

This driver uses an ADC input, ANIN1 or ANIN2 (see ADC). To use this, connect wire the sensor as this:

- tacho 1 -> ANINX+ (pin 3 or 7 of J2).
- tacho 2 -> ANINX- (pin 4 or 8 of J2).

Set the sensitivity switches to +-2V.

Call tac_Init() first in the initialization code. Then, call tac_Get() to get the motor speed.

## Function Documentation

float32_t tac_Get | ( | void |  | ) |

Return the measured paddle angular speed.

Return values

  The | paddle angular speed [deg/s].

void tac_Init | ( | AdcChannel | channel | ) |

Initialize the tachometer driver.

Parameters

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