I keep getting a weird error on ESP32 Cam when taking a picture and uploading it to firebase.
The response is on a loop and continues to output the following
Taking a photo…
Picture file name: /data/photo.jpg
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-VSYNC-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-VSYNC-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-VSYNC-OVF
cam_hal: EV-EOF-OVF
The picture has been saved in /data/photo.jpg – Size: 0 bytes
Taking a photo…
Picture file name: /data/photo.jpg
cam_hal: EV-EOF-OVF
The picture has been saved in /data/photo.jpg – Size: 0 bytes
Taking a photo…
Picture file name: /data/photo.jpg
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-VSYNC-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-VSYNC-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-VSYNC-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
The picture has been saved in /data/photo.jpg – Size: 0 bytes
Taking a photo…
Picture file name: /data/photo.jpg
cam_hal: EV-EOF-OVF
cam_hal: EV-VSYNC-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-VSYNC-OVF
cam_hal: EV-EOF-OVF
Does anyone know why this is?
Hi.
Does the picture get uploaded to Firebase despite the error?
If you try other ESP32-CAM sketches do you still get a similar error?
Regards,
Sara
Hi Sara,
The picture is not uploaded. And if I try other ESP32-CAM sketches, the problem does go away. The goal of the sketch is to wake the device up when motion is detected, take a picture, upload it to Firebase, and go back to sleep. One thing that is kinda weird is that problem seems to begin when I include <esp_sleep_enable_ext0_wakeup(GPIO_NUM_X, level)> to the sketch.
Hi.
Can you share your complete code?
Otherwise, it’s very difficult to try to figure out the issue.
To share a code please upload it to github or pastebin and then share a link.
Regards,
Sar
Hi Sara, here is a link on paste bin https://pastebin.com/yicWyN2B,
The goal of the sketch is to upload a an image to a firebase server from an esp32 cam with a unique name so that I can send multiple images
Hi agian.
did you first try the original code?
Was it working? Or did it produce a similar error?
Regards,
Sara
Hi Jeremy,
I believe there are some issues with construction of “FILE_PHOTO” String.
Observed in your code the keyword for “String” has a lower case “s”; change to upper case.
Changed “to.str(counter)”; to “String(counter)”.
Added a period in front of “jpg”.
Checked “FILE_PHOTO” String code in a simple sketch:
void setup() {
int counter;
Serial.begin(115200);
String str1 = "/data/photo" ;
String str2 = String(counter);
String str3 = str1 + str2 + ".jpg";
const char* FILE_PHOTO = str3.c_str();
Serial.println(FILE_PHOTO);
}
void loop() {
// put your main code here, to run repeatedly:
}
Serial.println(FILE_PHOTO); Result: "/data/photo0.jpg"
Regards,
William
Hi this still doesnt work. I am struggling to figure out how to upload multiple files to firebase still
Hi Jeremy,
Google’s Bard respondse to my prompt: Yes, it is possible to use the ESP32 CAM to upload multiple images in Arduino C++. Here is an example code:
#include <WiFi.h>
#include <FirebaseESP32.h>
#define FIREBASE_HOST "your-project-id.firebaseio.com"
#define FIREBASE_AUTH "your-secret-key"
const char* ssid = "your-ssid";
const char* password = "your-password";
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
}
void loop() {
// Take a picture with the ESP32 CAM
camera_fb_t *fb = esp_camera_fb_get();
if (fb == NULL) {
Serial.println("Camera capture failed");
return;
}
// Upload the picture to Firebase Storage
String imagePath = "/images/image_" + String(millis()) + ".jpg";
Firebase.Storage.putFile(imagePath, fb->buf, fb->len);
// Release the camera frame
esp_camera_fb_free(fb);
// Delay for a few seconds before taking another picture
delay(5000);
}
Maybe just a starting point; hope it helps.
Regards,
William