Skip to content

Commit 76b268f

Browse files
Merge pull request #260 from alanbjohnston/pico-v0.38-all
Pico v0.38 all
2 parents 23dfb04 + e50aafc commit 76b268f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cubesatsim/esp32-cam-send-jpeg-serial/esp32-cam-send-jpeg-serial.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ void setup() {
208208
}
209209

210210
void loop() {
211+
212+
Serial.println("ESP32-CAM Send JPG over Serial v0.2");
211213

212214
char filename[] = "/cam.jpg";
213215

cubesatsim/pico-get-jpeg-serial.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,17 @@ bool get_camera_image(bool debug_camera) {
181181

182182
// #ifdef GET_IMAGE_DEBUG
183183
if (debug_camera)
184-
Serial.println("Received from ESP32-CAM hex encoded:\n");
184+
Serial.println("Received from ESP32-CAM (hex encoded part is JPG image):\n");
185185
// #endif
186186
finished = false;
187187

188188
unsigned long time_start = millis();
189189
while ((!finished) && ((millis() - time_start) < CAMERA_TIMEOUT)) {
190190

191191
if (Serial2.available()) { // If anything comes in Serial2
192-
byte octet = Serial2.read();
192+
byte octet = Serial2.read();
193+
if ((!start_flag_detected) && (debug_camera))
194+
Serial.write(octet);
193195

194196
if (start_flag_complete) {
195197
// Serial.println("Start flag complete detected");

0 commit comments

Comments
 (0)