/* * File: themistor-temp.h * Author: athamantis * * Created on 08 March 2024, 11:46 */ #ifndef THEMISTOR_TEMP_H #define THEMISTOR_TEMP_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #define R_T0 100E3 #define T_0 298.15 #define B 3950 #define R_1 1000 #define ledpin PIN3_bm // Takes inn messured value #define ALERT_PIN PIN3_bm // Takes inn messured value // Calculates the temperature in celcius // Returns the thermistor themperature float calculate_thermistor_temp(float readValue); // Returns true if temperatur is higher than max_temp bool voltage_threshold_bool(float thermistor_temp, uint8_t max_temp); void alert_voltage_threshold_exceeded(bool voltage_threshold_bool); // Initialise alarm GPIO void init_alarm_gpio(); #ifdef __cplusplus } #endif #endif /* THEMISTOR_TEMP_H */