Change temprange to 20-50 and 80-90 degrees.

This commit is contained in:
Fliegerjohn 2024-05-05 22:28:11 +02:00
parent d846c930d4
commit fc39b3c863
Signed by: fliegerjohn
GPG key ID: E2221D5FE4656B6A

View file

@ -22,7 +22,7 @@ int WindowSize = 5000;
unsigned long windowStartTime; unsigned long windowStartTime;
// Temp adjustment // Temp adjustment
int tempset; float tempset;
int poti; int poti;
// time // time
@ -119,7 +119,7 @@ void lcdoutput() {
// Output temperatureset // Output temperatureset
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
lcd.print("set: "); lcd.print("set: ");
lcd.print(tempset); lcd.print(pidset);
lcd.write((byte)0); lcd.write((byte)0);
lcd.print("C"); lcd.print("C");
@ -144,6 +144,15 @@ void lcdoutput() {
// Read Poti // Read Poti
void settemp() { void settemp() {
poti = analogRead(A3); poti = analogRead(A3);
tempset = (18+(poti*0.07)); // range between 18°C and 18+1024*0,07 (~89°C) tempset = (20+(poti*0.04));
if (tempset <= 50) {
pidset = tempset; pidset = tempset;
} }
if (tempset >= 51) {
pidset = (tempset+30);
}
}