This commit is contained in:
2024-09-12 16:14:00 +02:00
commit 21a7ec26e4
30 changed files with 2223 additions and 0 deletions

27
Termisztor/Termisztor.ino Normal file
View File

@ -0,0 +1,27 @@
int ThermistorPin = 5;
int Vo;
float R1 = 10000;
float logR2, R2, T, Tc, Tf;
float c1 = 1.1384e-03, c2 = 2.3245e-04, c3 = 9.489e-08;
void setup() {
Serial.begin(9600);
}
void loop() {
Vo = analogRead(ThermistorPin);
R2 = R1 * (1023.0 / (float)Vo - 1.0);
logR2 = log(R2);
T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
Tc = T - 273.15;
Tf = (Tc * 9.0)/ 5.0 + 32.0;
Serial.print("Temperature: ");
Serial.print(Tf);
Serial.print(" F; ");
Serial.print(Tc);
Serial.println(" C");
delay(500);
}