Skip to content

Commit 22c1c46

Browse files
committed
Final version; as deployed; redy for prod
1 parent 03c48bd commit 22c1c46

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

makerspaceleiden-payment-node-7seg.ino

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// dirkx@webweaving.org, apache license, for the makerspaceleiden.nl
22
//
33
// Tools settings:
4-
// Board ESP32 WRover Module
4+
// Board ESP32
55
// Port: [the COM port your board has connected to]
66
//
77
// Boards used:
@@ -28,6 +28,7 @@
2828

2929
#ifndef WIFI_PASSWD
3030
#define WIFI_PASSWD "MyWifiPassword"
31+
#error "You prolly do not want this!"
3132
#endif
3233

3334
#include <WiFi.h>
@@ -196,13 +197,12 @@ void setup()
196197
l = w;
197198
})
198199
.onError([](ota_error_t error) {
199-
const char * label;
200+
const char * label = "FO:OF";
200201
if (error == OTA_AUTH_ERROR) label = (const char*) "FO:AF";
201202
else if (error == OTA_BEGIN_ERROR) label = (const char*) "FO:BF";
202203
else if (error == OTA_CONNECT_ERROR) label = (const char*) "FO:CF";
203204
else if (error == OTA_RECEIVE_ERROR) label = (const char*) "FO:RF";
204205
else if (error == OTA_END_ERROR) label = (const char*) "FO:EF";
205-
else label = "FO:OF";
206206
display.showString(label);
207207
Log.print("OTA error: E=");
208208
Log.print(error);
@@ -363,20 +363,21 @@ void loop()
363363
};
364364

365365
if (countdown <= 0) {
366-
heatingOnOff(false);
367366
countdown = 0;
368367

369368
// flash aggressivily once time is up.
370369
//
371-
for (int i = 0; i < 30; i++) {
370+
for (int i = 0; i < 20; i++) {
372371
display.setBrightness((i & 1) ? BRIGHT_HIGH : BRIGHT_LOW);
373372
display.showString("0000");
374-
delay(100);
373+
delay(120);
375374
display.showString("----");
376-
delay(100);
375+
delay( 70);
377376
};
378377

379-
// go back to normal
378+
// go back to normal, switch things off.
379+
//
380+
heatingOnOff(false);
380381
md = ENTER_AMOUNT;
381382
break;
382383
};

0 commit comments

Comments
 (0)