CodeUC HRI2  v2.0
Microcontroller firmware of the board used during the HRI labs.
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:

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
Thepaddle angular speed [deg/s].
void tac_Init ( AdcChannel  channel)

Initialize the tachometer driver.

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