• 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 MicroSD card no pin left?

Q&A Forum › Category: ESP32 › ESP32 Cam MicroSD card no pin left?
0 Vote Up Vote Down
Peerajak Witoonchart asked 5 years ago

Hi, According to your post https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/
I need some pins to use with TM1637, a 4 digits 7segments.
It seems that there is no pin left. 
Currently I use GPIO 12,14 for TM1637 interface and works., however, it will report error when boot up. The way I made it work is to insert TM1637 electrical connection after bootup. The error said something about SDcard, I guess it has something to do with MicroSD card using the same pin with TM1637?  Is it really the case? So which pin should I use? 

Question Tags: ESP32-Cam
8 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.
The microSD card uses those GPIOs.
Are you using the microSD card in your project?
What is exactly the error that you get?
You can try using GPIO 3 and GPIO 1. But, you won’t be able to open a serial connection to see the serial monitor.
You can also try GPIO 4 and GPIO 16 and see if it works.
Regards,
Sara

0 Vote Up Vote Down
Peerajak Witoonchart answered 5 years ago

I run this following code.
If I wait for ESP32 cam to boot up, and later plugin the pins to  TM1637, this code works fine. TM1637 shows the intended number
If I plugin the pins to TM1637 before booting, it will have the following error.

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57


#include <Arduino.h>
#include <TM1637Display.h>
// Module connection pins (Digital Pins)
#define CLK 14
#define DIO 12
// The amount of time (in milliseconds) between tests
#define TEST_DELAY 2000
const uint8_t SEG_DONE[] = {
SEG_B | SEG_C | SEG_D | SEG_E | SEG_G, // d
SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, // O
SEG_C | SEG_E | SEG_G, // n
SEG_A | SEG_D | SEG_E | SEG_F | SEG_G // E
};
TM1637Display display(CLK, DIO);
void setup()
{
}
void loop()
{
int k;
uint8_t data[] = { 0xff, 0xff, 0xff, 0xff };
uint8_t blank[] = { 0x00, 0x00, 0x00, 0x00 };
display.setBrightness(0x0f);
// All segments on
//display.setSegments(data);
//delay(TEST_DELAY);
k=32539;
k = k%10000;
// Selectively set different digits
data[0] = display.encodeDigit((k%10000)/1000);
data[1] = display.encodeDigit((k%1000)/100);
data[2] = display.encodeDigit((k%100)/10);
data[3] = display.encodeDigit(k%10);
display.setSegments(data);
delay(TEST_DELAY);

}
Start your code here
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Those pins probably conflict with with the boot process.
Experiment other GPIOs and see what you get.
GPIO 14 and 15 is also a good option.
Regards,
Sara

0 Vote Up Vote Down
Peerajak Witoonchart answered 5 years ago

Hi. It works.
Can you please explain how do you come up with GPIO14,15?
Thank you

0 Vote Up Vote Down
Peerajak Witoonchart answered 5 years ago

Hi, 
I just apply the TM1637 code to ESP32 CAM PIR, which save pictures to SDCARD, and got the following error. Eventhough I already use GPIO14 for CLK, and 15 for DIO. When I remove the electrical connection from TM1637 to pin 14,15, the ESP32 CAM-PIR works fine. How can I avoid this?
 

Starting SD Card
Starting SD Card
E (24149) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
SD Card Mount Failed
No SD Card attached
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.
The error you get is because the microSD card uses the same pins of the TM1637.
You probably need to try another combination of pins that don’t use the microSD card if you want to use both at the same time.
Regards,
Sara

0 Vote Up Vote Down
Steve Mercer answered 5 years ago

The AITHINKER board has very few pins available. Seeing as both the TM1637 and the camera need to use the same pins for I2C you need to modulate your usage of each. So turn the camera off when you need to use the TM1637 and vice versa. Reference https://www.electro-tech-online.com/threads/esp32-cam-module-i2c-other-i-o.157602/

0 Vote Up Vote Down
Peerajak Witoonchart answered 5 years ago

Thank you.

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

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 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.