CodeUC HRI2  v2.0
Microcontroller firmware of the board used during the HRI labs.
tachometer.h
Go to the documentation of this file.
1 #ifndef __TACHOMETER_H
2 #define __TACHOMETER_H
3 
4 #include "../main.h"
5 #include "adc.h"
6 
7 #define TAC_RPM_TO_VOLTAGE 0.00052f // According to the Maxon DC Tacho DCT 22 datasheet [V/RPM].
8 #define TAC_VOLTAGE_TO_RPM (1/TAC_RPM_TO_VOLTAGE) // [RPM/V].
9 
27 void tac_Init(AdcChannel channel);
28 float32_t tac_Get(void);
29 
34 #endif
AdcChannel
Enum that corresponds to the two ADC input channels of the board.
Definition: adc.h:63
void tac_Init(AdcChannel channel)
Initialize the tachometer driver.
Definition: tachometer.c:9
float32_t tac_Get(void)
Return the measured paddle angular speed.
Definition: tachometer.c:18