ESP32-Cam and SD Card

Pcborges
Posts: 31
Joined: Thu Aug 09, 2018 9:56 pm

Re: ESP32-Cam and SD Card

Postby Pcborges » Thu Sep 26, 2019 11:31 am

@ mozgy-eu

But what gpio pins are freed by initializing the SD Card this way?
Thanks
Paulo

LBLBLBLB
Posts: 4
Joined: Mon Dec 16, 2019 12:35 pm

Re: ESP32-Cam and SD Card

Postby LBLBLBLB » Wed Dec 18, 2019 12:55 pm

I can not seem to be able to use IO0 for my servo-how did you redeclare it after it is configured for camera?

Also for the example about freeing up pins which pins are they?

alanesq
Posts: 43
Joined: Thu Dec 14, 2017 8:38 pm

Re: ESP32-Cam and SD Card

Postby alanesq » Sun Feb 23, 2020 12:54 pm

Hi,

Just wanted to confirm that if you start the sd card in "1 wire" mode with: SD_MMC.begin("/sdcard", true)
you can then still have full control of the illumination LED :-)

I have also included "pinMode(2, INPUT_PULLUP);" - I have not yet tested if this is actually needed on this board?

I have just implemented it in my security camera sketch and it works great.
see full code here: https://github.com/alanesq/CameraWifiMotion

Thanks for the tip :-)

May be of interest: https://www.reddit.com/r/esp32/comments ... alk_to_an/

-----------------
Update:

Some additional info. on using 1-bit mode on the sd card to free up some io pins:

If you access the sd card in 1-bit mode with the command: SD_MMC.begin("/sdcard", true)
you can then use pins 12 and 13 as general io pins (although 12 must be low at boot)
You can also use the Flash LED on pin 4 no problem (it also stops it flashing when you access the sd card)
but, you have to define these pins as input or output after initialising the sd card as otherwise it re-configures them

There is also the possibility of soldering direct to some extra pins on the esp32-s module its self (possibilities? 16, 17, 9, 10, 11, 6, 7, 8)
and of course the rx and tx serial pins could be used as previously stated

Who is online

Users browsing this forum: Bing [Bot] and 25 guests