From de327d8d786a81e44ad6f42a703f3b29914942b1 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 22 Feb 2023 20:57:31 -0500 Subject: [PATCH] blink 3 times at start, print image length --- .../esp32-cam-send-jpeg-serial.ino | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 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 9ba94de9..98911f65 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 @@ -175,14 +175,27 @@ void deleteFile(fs::FS &fs, const char * path) { void setup() { - delay(5000); +// delay(5000); + + Serial.begin(115200); + + 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 // #define uS_TO_S_FACTOR 1000000ULL /* Conversion factor for micro seconds to seconds */ // #define TIME_TO_SLEEP 10 /* Time ESP32 will go to sleep (in seconds) */ // esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); // testing sleep - Serial.begin(115200); - initialize_camera(); config_camera(); @@ -370,6 +383,8 @@ void save_camera_image(char* filename) Serial.println("- failed to open file for writing"); return; } + + Serial.printf("\nImage length: %d \n", pic->len); for (int k = 0; k < pic->len; k++) { file.write(pic->buf[k]);