Page 1 of 1
ESP32-CAM Problem with not enough pins
Posted: Thu Nov 14, 2019 9:35 pm
by zdyboo
Hi, i am using this module with active camera and sd-card reader and i need 2 pins to software i2c to connect modules.
I added lines in SD_MMC.cpp
Code: Select all
slot_config.width = 1
host.flags = SDMMC_HOST_FLAG_1BIT;
I try to use many combination of pins for example 13,16; 13,12; and more...
Anything dont work. According to this thread :
viewtopic.php?t=11703, i have free pins 13,12 and 4 but 4 - it is flash led, 12 - if is use it, esp32 cant boot, the same o 16 pin - all time reboot. What i have to do to change these pins to I2C?
Re: ESP32-CAM Problem with not enough pins
Posted: Mon Dec 02, 2019 7:23 pm
by wattexi
I have the same problem, I need 2 pins free ... did you succeed and if so how?
Re: ESP32-CAM Problem with not enough pins
Posted: Tue Dec 03, 2019 5:34 am
by chegewara
https://github.com/espressif/esptool/wi ... -Selection
When you read this you can see that pin 12 cant be connected to VCC (in your case, from your issue description):
If driven High, flash voltage (VDD_SDIO) is 1.8V not default 3.3V. Has internal pull-down, so unconnected = Low = 3.3V. May prevent flashing and/or booting if 3.3V flash is used and this pin is pulled high, causing the flash to brownout. See the ESP32 datasheet for more details.
but I2C requires SDA and SCL to be pullup.
There is solution for this, but its not easy. When you burn efuse then esp32 wont read pin 12 on restart:
https://github.com/espressif/esptool/wi ... e-vdd_sdio
Of course you have to know what you are doing burning efuse because you may brick your device.
Re: ESP32-CAM Problem with not enough pins
Posted: Wed Dec 04, 2019 7:39 pm
by wattexi
thanks for your answer i'm looking at that
Re: ESP32-CAM Problem with not enough pins
Posted: Mon Feb 24, 2020 4:41 pm
by NoChill_Senpai
Hi, If I want to use an I2C device with the CAM and the SD card, could I use the pin 0 that is used for the clock on the camera with the SDL pin for the I2C?
Re: ESP32-CAM Problem with not enough pins
Posted: Tue Feb 25, 2020 11:21 am
by bobtidey
You can use the TXD and RXD pins as GPIO.
Obviously they are not operational during a flash upload operation which may mean swapping wires to do uploads but if you use OTA then that doesn't matter after the first flash.
Using RXD doesn't affect any serial debug print but using TXD will.
Re: ESP32-CAM Problem with not enough pins
Posted: Tue Feb 25, 2020 4:15 pm
by alanesq
You can use the sd card in "1 bit" mode which means you can then still control the onboard led (gpio4) when using an sd card?
gpio12 and 13 are then not used by the sd card
see:
https://www.reddit.com/r/esp32/comments ... alk_to_an/
Re: ESP32-CAM Problem with not enough pins
Posted: Sun Mar 15, 2020 4:24 pm
by dwienie
bobtidey wrote: ↑Tue Feb 25, 2020 11:21 am
You can use the TXD and RXD pins as GPIO.
Obviously they are not operational during a flash upload operation which may mean swapping wires to do uploads but if you use OTA then that doesn't matter after the first flash.
Using RXD doesn't affect any serial debug print but using TXD will.
Where you able to use OTA with this device?
Re: ESP32-CAM Problem with not enough pins
Posted: Tue Mar 17, 2020 6:05 pm
by alanesq
[/quote]
Where you able to use OTA with this device?
[/quote]
Hi,
I have used OTA sucesfully with the esp32-cam but instead of selectingthe "ESP32-cam" board in the Arduino IDE, use "ESP32 Dev Module" and make sure PSRAM is enabled and Partition iis set to "default 4mb with spiffs"
Re: ESP32-CAM Problem with not enough pins
Posted: Sat Sep 26, 2020 7:05 am
by alanesq
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