mikrokontrollersystemer-pro.../prosjekt.X/themistor-temp.h

39 lines
573 B
C
Raw Normal View History

2024-03-08 10:48:49 +00:00
/*
* 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
2024-03-13 09:25:36 +00:00
#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
2024-03-13 10:21:14 +00:00
// Returns the thermistor themperature
2024-03-13 09:25:36 +00:00
float calculate_thermistor_temp(float readValue);
2024-03-08 10:48:49 +00:00
#ifdef __cplusplus
}
#endif
#endif /* THEMISTOR_TEMP_H */