Page 1 of 1

Not working D12/D13

Posted: Thu Feb 28, 2019 9:54 am
by Jurkylius
Hi,
I have this problem. I using DOIT ESP32 Devkit 36 pin version.
I need using 8-relay module with only set pinMode. Pins between D32-D14 working good but pins D13/D12 not. If I connect it on relay (len on relay channel lighting lower) and arduino sketch in serial monitor write me this message:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
cmd len -1
ets_main.c 371
ets Jun 8 2016 00:22:57

Arduino code:
void setup() {
pinMode(LIGHT_PIN, OUTPUT);
digitalWrite(LIGHT_PIN, HIGH);
}

void loop()
{
if(millis()-entryOneSec >= 1000) {
entryOneSec = millis();
if(millis()-entryThirdteenSec >= 30000) {
entryThirdteenSec = millis();
digitalWrite(LIGHT_PIN, LOW);
}
if(millis()-entrySixteenSec >= 60000) {
entrySixteenSec = millis();
digitalWrite(LIGHT_PIN, HIGH);
}
}
}

When I disconnect this two pins all work. Can anyone help me for this?

Re: Not working D12/D13

Posted: Thu Feb 28, 2019 10:19 am
by ESP_Sprite
Not sure what's with D13, but GPIO12 is a bootstrap pin; the input value it has on startup sets the flash voltage. If you put the wrong level on this pin at bootup, the ESP32 effectively won't boot.

Re: Not working D12/D13

Posted: Wed Mar 06, 2019 6:31 am
by Jurkylius
Yes I mean GPIO 12 and 13. Can I want using GPIO 12/13 as OUTPUT with relay or this pins can't be connected?

Re: Not working D12/D13

Posted: Wed Mar 06, 2019 7:17 am
by ESP_Sprite
Yes, you can. Just be sure your relay board does not have a pull-up resistor on its input; that would have the side effect of pulling up GPIO12 on reset, which causes the ESP32 to switch to the wrong flash voltage.

Re: Not working D12/D13

Posted: Wed Mar 06, 2019 7:48 am
by Jurkylius
Ok. Thanks for advice. I using this relay module and I think it have pull up rezistor.