2025-01-0600 Delete Datenfile eingebaut.
This commit is contained in:
parent
34cd709017
commit
63c20bedd2
|
@ -73,3 +73,10 @@ build_flags =
|
|||
-DILI9341_2_DRIVER
|
||||
-DSTASSID=\"FRITZ!Box7362SL\"
|
||||
-DSTAPSK=\"BorisundEva2007\"
|
||||
|
||||
[env:cydalm]
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DILI9341_2_DRIVER
|
||||
-DSTASSID=\"WLAN-7QHHAK\"
|
||||
-DSTAPSK=\"3557919930817586\"
|
||||
|
|
23
src/main.cpp
23
src/main.cpp
|
@ -270,7 +270,7 @@ void setup() {
|
|||
Serial.println(ssid);
|
||||
WiFi.begin(ssid, password);
|
||||
Versuche = 0;
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
while ((WiFi.status() != WL_CONNECTED) ^ (Versuche >= WiFiError)) {
|
||||
delay(500);
|
||||
Serial.print(".");
|
||||
Versuche += 1;
|
||||
|
@ -283,13 +283,21 @@ void setup() {
|
|||
tft.invertDisplay(a % 2);
|
||||
delay(500);
|
||||
}
|
||||
WiFi.disconnect();
|
||||
ESP.restart();
|
||||
/* WiFi.disconnect();
|
||||
ESP.restart(); */
|
||||
}
|
||||
else {
|
||||
tft.invertDisplay(false);
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
tft.drawCentreString(" Kein WLAN ! ", 160, 110, fontNum = 4);
|
||||
delay(500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Print local IP address and start web server
|
||||
tft.invertDisplay(false);
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
Serial.println("");
|
||||
Serial.println("WiFi connected.");
|
||||
|
@ -612,7 +620,14 @@ void Menue(){
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if((touch.y >= 15) && (touch.y <= 30)){
|
||||
if((touch.x >= 270) && (touch.x <= 290)){
|
||||
deleteFile(SD, "/daten.csv");
|
||||
writeFile(SD, "/daten.csv", "Zeit;Temperatur;Feuchtigkeit\n");
|
||||
NoTouchScreen(touch);
|
||||
zurueck = false;
|
||||
}
|
||||
}
|
||||
if((touch.y >= 15) && (touch.y <= 30)){
|
||||
if((touch.x >= 15) && (touch.x <= 30)){
|
||||
NoTouchScreen(touch);
|
||||
|
|
Loading…
Reference in New Issue
Block a user