Skip to content
This repository was archived by the owner on Dec 17, 2021. It is now read-only.

Commit 01c587a

Browse files
authored
modify code flow so sd card setup occurs earlier
1 parent f583aaa commit 01c587a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

waste_watcher_code/waste_watcher_code.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,12 @@ void setup() {
289289
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
290290
Serial.println("Setup ESP32 to sleep for every " + String(TIME_TO_SLEEP) + " Seconds");
291291

292+
// === sd card setup ===
293+
sdSetup();
294+
292295
// === ultrasonic setup ===
293296
pinMode(ultrasonicTrigPin, OUTPUT);
294297
pinMode(ultrasonicEchoPin, INPUT);
295-
296-
// === sd card setup ===
297-
sdSetup();
298298

299299
// === wifi setup ===
300300
Serial.print("Connecting to ");

0 commit comments

Comments
 (0)