From 7fc01a0467f3dd00712bf505881c524fe81a8a0a Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 15 Dec 2022 11:11:58 -0500 Subject: [PATCH] blink 3 times on boot --- .../esp32-cam-send-jpeg-serial.ino | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cubesatsim/esp32-cam-send-jpeg-serial/esp32-cam-send-jpeg-serial.ino b/cubesatsim/esp32-cam-send-jpeg-serial/esp32-cam-send-jpeg-serial.ino index cf884492..79aafa37 100644 --- a/cubesatsim/esp32-cam-send-jpeg-serial/esp32-cam-send-jpeg-serial.ino +++ b/cubesatsim/esp32-cam-send-jpeg-serial/esp32-cam-send-jpeg-serial.ino @@ -227,6 +227,21 @@ void setup() { } */ + pinMode(LED_PIN, OUTPUT); // Set the pin as output + + Serial.println("\nBlink three times"); + digitalWrite(LED_PIN, LOW); // Turn on + delay (100); // Wait 0.1 sec + digitalWrite(LED_PIN, HIGH); // Turn off + delay(100); // Wait 0.1 sec + digitalWrite(LED_PIN, LOW); // Turn on + delay (100); // Wait 0.1 sec + digitalWrite(LED_PIN, HIGH); // Turn off + delay(100); // Wait 0.1 sec + digitalWrite(LED_PIN, LOW); // Turn on + delay (100); // Wait 0.1 sec + digitalWrite(LED_PIN, HIGH); // Turn off + } void loop() { @@ -239,26 +254,11 @@ void loop() { if (digitalRead(13) == HIGH) { sleep_cam = true; // only sleep if GPIO13 is High on boot - Serial.println("GPIO13 is LOW, so don't sleep"); + Serial.println("\nGPIO13 is LOW, so don't sleep"); } bool timeout = false; bool take_photo = false; - - pinMode(LED_PIN, OUTPUT); // Set the pin as output - - Serial.println("\nBlink three times"); - digitalWrite(LED_PIN, LOW); // Turn on - delay (100); // Wait 0.1 sec - digitalWrite(LED_PIN, HIGH); // Turn off - delay(100); // Wait 0.1 sec - digitalWrite(LED_PIN, LOW); // Turn on - delay (100); // Wait 0.1 sec - digitalWrite(LED_PIN, HIGH); // Turn off - delay(100); // Wait 0.1 sec - digitalWrite(LED_PIN, LOW); // Turn on - delay (100); // Wait 0.1 sec - digitalWrite(LED_PIN, HIGH); // Turn off /*