diff --git a/the-cup.ino b/the-cup.ino index 0042073..607e839 100644 --- a/the-cup.ino +++ b/the-cup.ino @@ -70,6 +70,7 @@ void send_uid(char reader_uid[]); void setup() { Serial.begin(115200); + delay(1000); pinMode(LED_PIN, OUTPUT); @@ -82,6 +83,10 @@ void loop() { read_card(reader_uid); send_uid(reader_uid); } + else { + delay(200); + ESP.deepSleep(SLEEP_DURATION * 1000000); + } } void read_card(char reader_uid[]) { @@ -132,7 +137,6 @@ void send_uid(char reader_uid[]) { https.end(); Serial.print("[HTTPS] ended...\n"); - ESP.deepSleep(SLEEP_DURATION * 1000000); } void byte_to_string(byte array[], unsigned int len, char buffer[]) {