update kp ki, and put digitalwrite after inits

This commit is contained in:
Vincent van der Wal
2026-06-10 18:15:08 +02:00
parent 85b89797b7
commit c79559a82d
2 changed files with 5 additions and 4 deletions
+5 -4
View File
@@ -27,7 +27,7 @@ unsigned long lastWebSocket = 0;
const unsigned long WS_INTERVAL = 500; const unsigned long WS_INTERVAL = 500;
float temperature = 0; float temperature = 0;
float targetTemp = 460; float targetTemp = 370.0f; // default target temp for preheating, adjustable via UI
unsigned long lastSwitch = 0; unsigned long lastSwitch = 0;
float pwmSwitchDelayOn = 2000; // 2s float pwmSwitchDelayOn = 2000; // 2s
@@ -35,8 +35,8 @@ float pwmSwitchDelayOff = 4000; // 4s
float power = 100; float power = 100;
float kp = 0.6; float kp = 0.55;
float ki = 0.1; float ki = 0.005;
float kd = 0.0; float kd = 0.0;
// Heating modes. PREHEAT, PAUSE and BAKING are all PI-regulated and only // Heating modes. PREHEAT, PAUSE and BAKING are all PI-regulated and only
@@ -402,12 +402,13 @@ void setup()
{ {
Serial.begin(9600); Serial.begin(9600);
pinMode(relay, OUTPUT); pinMode(relay, OUTPUT);
digitalWrite(relay, LOW); // boot with heating OFF; the PI loop drives the relay
initWiFi(); initWiFi();
initLittleFS(); initLittleFS();
initWebSocket(); initWebSocket();
digitalWrite(relay, LOW); // boot with heating OFF; the PI loop drives the relay
// Web Server Root URL // Web Server Root URL
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) server.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
{ request->send(LittleFS, "/index.html", "text/html"); }); { request->send(LittleFS, "/index.html", "text/html"); });
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 KiB