Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Accelerometer.h
Go to the documentation of this file.
1#ifndef RENNSMOTORSPORT_ACCELEROMETER_H
2#define RENNSMOTORSPORT_ACCELEROMETER_H
3
4#include "../AnalogSensor.h"
5
6typedef struct {
8 float value;
10
20void initAccelerometer(Accelerometer* accel, int channel, int hz, int muxChannel);
21
29
35void updateAccelerometer(void* accel);
36
43float transferFunctionAccelerometer(float rawVal);
44
45#endif // RENNSMOTORSPORT_ACCELEROMETER_H
float transferFunctionAccelerometer(float rawVal)
Converts raw accelerometer data to a meaningful value.
Definition: Accelerometer.c:25
void updateAccelerometer(void *accel)
Updates the accelerometer data.
Definition: Accelerometer.c:18
float getAccelerometerValue(Accelerometer *accel)
Gets the current value of the accelerometer.
Definition: Accelerometer.c:14
void initAccelerometer(Accelerometer *accel, int channel, int hz, int muxChannel)
Initializes the accelerometer with the given channel, frequency, and multiplexer channel.
Definition: Accelerometer.c:8
AnalogSensor base
Definition: Accelerometer.h:7