• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 CAM testing with and without pushing button

Q&A Forum › Category: ESP32 › ESP32 CAM testing with and without pushing button
0 Vote Up Vote Down
Felipe Gonzalez asked 5 years ago

I’m testing the Random Nerd codes included in the Random Nerds ESPP32-CAM-Projects-eBook to take photos and store it on a Micro SD Card. The code in the Unit 1 Take Photos and Save to MicroSD Card (Time-lapse) works fine. Nevertheless the code in the Unit 4 Take Photo and Save to MicroSD Card with Pushbutton described on page 115 which add the push button feature save just parts of the photo not the complete frame on the MicroSD Card. I checked that both codes and all the camera and MicroSD card setting are identical just the second code includes the debouncing detection process for the push button. I will appreciated any help about this issue. Thanks

Question Tags: ESP32 CAM push button issues
7 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.
Can you try these scenarios and see if any of these options solves your problem?

  • Decrease the frame size of the photo. For example:
config.frame_size = FRAMESIZE_VGA;
  • Decrease the quality (choose a higher number), for example 20:
config.jpeg_quality = 20; //0-63 lower number means higher quality

Do you get any messages on the serial monitor when you press the pushbutton?
Regards.
Sara

0 Vote Up Vote Down
Felipe Gonzalez answered 5 years ago

Thanks Sara for your answer.
I have changed the picture frame_size and the jpeg_quality to your recommended settings and now all the pictures are completed.
OLD settings:
config.frame_size = FRAMESIZE_UXGA; // FRAMESIZE_ + QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA
config.jpeg_quality = 10; //0-63 lower number means higher quality
New settings:
config.frame_size = FRAMESIZE_VGA; // FRAMESIZE_ + QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA
config.jpeg_quality = 20; //0-63 lower number means higher quality
Why is this issue? It’s supposed that the anti bouncing software doesn’t interfere with the TakeSavePhoto routine.
It’s strange that this issue is not present when the anti bouncing code is absent and the rest of the code is identical.
Is there some documentation regarding the esp_camera.h library and the other libraries used in this program?
Thanks!
Felipe

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.
I’m not sure why that problem happens. But other readers had the same problem, and changing the settings solved the issue.
I don’t think there is any documentation about those libraries.
You can find the esp_camera.h file here: https://github.com/espressif/esp32-camera/blob/master/driver/include/esp_camera.h
Regards,
Sara

0 Vote Up Vote Down
Felipe Gonzalez answered 5 years ago

Thanks Sara, now a new issue happened: The micro SD card cannot be recognized by the code. I tried several times with different cards included a new one with the same results:
-> Initializing the microSD card module… Starting SD Card
-> SD Card Mount Failed
It is strange because it works fine before.

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi gain.

Yes, it is very strange indeed.

Can you try it again with the time lapse code and see if it works?

Just to figure out if it has everything to do with the code.

Regards,

Sara

0 Vote Up Vote Down
Felipe Gonzalez answered 5 years ago

Hi,
I solved this issue loading again the plain text code in the arduino IDE and compiled again. Now the MicroSD card is mounted correctly.
Regards,
Felipe

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.
Great! I’m glad the issue is solved.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.