File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 11installer /main_assets
22installer /firmware
33.pio
4+ .DS_Store
45.vscode
56dist
67build
Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ bool down = false;
4040long thresholdSum = 0 ;
4141long payment_amount = 0 ;
4242
43+ // Serial config
44+ int portalPin = 4 ;
45+
4346WebSocketsClient webSocket;
4447
4548struct KeyValue {
@@ -51,6 +54,25 @@ void setup()
5154{
5255 Serial.begin (115200 );
5356 pinMode (2 , OUTPUT); // To blink on board LED
57+
58+ int timer = 0 ;
59+ while (timer < 2000 )
60+ {
61+ digitalWrite (2 , HIGH);
62+ Serial.println (touchRead (portalPin));
63+ if (touchRead (portalPin) < 60 )
64+ {
65+ Serial.println (" Launch serial config" );
66+ configOverSerialPort ();
67+ timer = 5000 ;
68+ }
69+
70+ timer = timer + 100 ;
71+ delay (150 );
72+ digitalWrite (2 , LOW);
73+ delay (150 );
74+ }
75+
5476 FlashFS.begin (FORMAT_ON_FAIL);
5577 readFiles (); // get the saved details and store in global variables
5678 WiFi.begin (ssid.c_str (), wifiPassword.c_str ());
You can’t perform that action at this time.
0 commit comments