Vehicle Control Unit 0.01
This is the c library for controlling the car.
|
#include "../AnalogSensor.h"
Go to the source code of this file.
Classes | |
struct | Accelerometer |
Functions | |
void | initAccelerometer (Accelerometer *accel, int channel, int hz, int muxChannel) |
Initializes the accelerometer with the given channel, frequency, and multiplexer channel. More... | |
float | getAccelerometerValue (Accelerometer *accel) |
Gets the current value of the accelerometer. More... | |
void | updateAccelerometer (void *accel) |
Updates the accelerometer data. More... | |
float | transferFunctionAccelerometer (float rawVal) |
Converts raw accelerometer data to a meaningful value. More... | |
float getAccelerometerValue | ( | Accelerometer * | accel | ) |
Gets the current value of the accelerometer.
accel | Pointer to the Accelerometer structure to query. |
Definition at line 14 of file Accelerometer.c.
void initAccelerometer | ( | Accelerometer * | accel, |
int | channel, | ||
int | hz, | ||
int | muxChannel | ||
) |
Initializes the accelerometer with the given channel, frequency, and multiplexer channel.
accel | Pointer to the Accelerometer structure to initialize. |
channel | The analog channel the accelerometer is connected to. |
hz | The frequency in Hertz at which the accelerometer operates. |
muxChannel | The multiplexer channel for the accelerometer. |
Definition at line 8 of file Accelerometer.c.
float transferFunctionAccelerometer | ( | float | rawVal | ) |
Converts raw accelerometer data to a meaningful value.
rawVal | The raw data from the accelerometer. |
Definition at line 25 of file Accelerometer.c.
void updateAccelerometer | ( | void * | accel | ) |
Updates the accelerometer data.
accel | Pointer to the Accelerometer structure to update. |
Definition at line 18 of file Accelerometer.c.