41 lines
753 B
C
41 lines
753 B
C
/*
|
|
* 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 <stdbool.h>
|
|
#include <float.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include <math.h>
|
|
#define R_t0 10000
|
|
#define T_0 298.15
|
|
#define B 3950
|
|
#define R_1 1000
|
|
|
|
// 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 then high_temp int
|
|
bool error_message(float thermistor_temp);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* THEMISTOR_TEMP_H */
|
|
|