|
1 | 1 | // dirkx@webweaving.org, apache license, for the makerspaceleiden.nl |
2 | 2 | // |
3 | 3 | // Tools settings: |
4 | | -// Board ESP32 WRover Module |
| 4 | +// Board ESP32 |
5 | 5 | // Port: [the COM port your board has connected to] |
6 | 6 | // |
7 | 7 | // Boards used: |
|
28 | 28 |
|
29 | 29 | #ifndef WIFI_PASSWD |
30 | 30 | #define WIFI_PASSWD "MyWifiPassword" |
| 31 | +#error "You prolly do not want this!" |
31 | 32 | #endif |
32 | 33 |
|
33 | 34 | #include <WiFi.h> |
@@ -196,13 +197,12 @@ void setup() |
196 | 197 | l = w; |
197 | 198 | }) |
198 | 199 | .onError([](ota_error_t error) { |
199 | | - const char * label; |
| 200 | + const char * label = "FO:OF"; |
200 | 201 | if (error == OTA_AUTH_ERROR) label = (const char*) "FO:AF"; |
201 | 202 | else if (error == OTA_BEGIN_ERROR) label = (const char*) "FO:BF"; |
202 | 203 | else if (error == OTA_CONNECT_ERROR) label = (const char*) "FO:CF"; |
203 | 204 | else if (error == OTA_RECEIVE_ERROR) label = (const char*) "FO:RF"; |
204 | 205 | else if (error == OTA_END_ERROR) label = (const char*) "FO:EF"; |
205 | | - else label = "FO:OF"; |
206 | 206 | display.showString(label); |
207 | 207 | Log.print("OTA error: E="); |
208 | 208 | Log.print(error); |
@@ -363,20 +363,21 @@ void loop() |
363 | 363 | }; |
364 | 364 |
|
365 | 365 | if (countdown <= 0) { |
366 | | - heatingOnOff(false); |
367 | 366 | countdown = 0; |
368 | 367 |
|
369 | 368 | // flash aggressivily once time is up. |
370 | 369 | // |
371 | | - for (int i = 0; i < 30; i++) { |
| 370 | + for (int i = 0; i < 20; i++) { |
372 | 371 | display.setBrightness((i & 1) ? BRIGHT_HIGH : BRIGHT_LOW); |
373 | 372 | display.showString("0000"); |
374 | | - delay(100); |
| 373 | + delay(120); |
375 | 374 | display.showString("----"); |
376 | | - delay(100); |
| 375 | + delay( 70); |
377 | 376 | }; |
378 | 377 |
|
379 | | - // go back to normal |
| 378 | + // go back to normal, switch things off. |
| 379 | + // |
| 380 | + heatingOnOff(false); |
380 | 381 | md = ENTER_AMOUNT; |
381 | 382 | break; |
382 | 383 | }; |
|
0 commit comments