1#include "../../../Inc/Sensors/AnalogSensors/Temperature.h"
10 printf(
"Implement Temperature::update\n");
20 return temp->
degrees * 9.0 / 5.0 + 32;
void initAnalogSensor(AnalogSensor *analogSensor, const char *name, int hz, int channel)
Initializes an analog sensor and configures the corresponding GPIO pin.
double getTemperatureFahrenheit(Temperature *temp)
Gets the current temperature in Fahrenheit.
void initTemperature(Temperature *temp, int hz, int channel)
Initializes the Temperature sensor with the given frequency and channel.
double transferFunction(Temperature *temp, int rawVal)
Converts raw temperature data to a meaningful temperature value.
double getTemperatureCelsius(Temperature *temp)
Gets the current temperature in Celsius.
void updateTemperature(void *temp)
Updates the Temperature data.
void(* update)(void *self)