From 4ee2cf21ba58bc7749ab9b630c497c932c001406 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 15 Dec 2022 09:24:58 -0500 Subject: [PATCH] test GPIO16 output --- .../esp32-cam-send-jpeg-serial.ino | 9 +++++++++ 1 file changed, 9 insertions(+) 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 b3219678..f957a61a 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 @@ -183,10 +183,18 @@ void setup() { Serial.begin(115200); + pinMode(16, OUTPUT); + } void loop() { + + digitalWrite(16, LOW); + + delay(2000); + + digitalWrite(16, HIGH); bool timeout = false; bool take_photo = false; @@ -209,6 +217,7 @@ void loop() { Serial.println("Checking for serial input before sleeping"); unsigned long timer_ms = millis(); while ((Serial.available() <= 0) && !timeout) { + timeout = true; // immediately timeout // if ((millis() - timer_ms) > 10000) timeout = true; // poll serial for 10 seconds } if (Serial.available() > 0) {