Reset pins to low level on reboot??
Reset pins to low level on reboot??
Good day. Please help advice. Immediately I apologize for my English. When using the ESP.restart() command, all pins remain at the same level as they were previously set. Can you tell me how can I reset some or all of the pins to a low level after using the ESP.restart() command? Thanks a lot in advance.
Re: Reset pins to low level on reboot??
How about trying gpio_reset_pin(GPIO_NUM_X); on the pins you want to reset before calling ESP.restart()
Re: Reset pins to low level on reboot??
Unfortunately this option doesn't work for me. Since this pin should work until the reboot itself. In fact, my situation is slightly different, I just took ESP.restart as an example. My situation is as follows: my esp32 periodically turns on the electric motor, and both the esp32 and the electric motor are powered by one large battery. So, when the battery is slightly discharged, esp32 starts the electric motor, thereby causing a voltage drop and esp32 reboots, but after a reboot, the Pin that controls the electric motor remains one, respectively, the electric motor starts up again and drawdown and reboot again, and this cycle lasts until the Battery is completely discharged. I want that at the first drawdown and reboot, the pin goes to zero, and the electric motor does not start. In general, something like this) I hope you understand me.)
-
- Posts: 9711
- Joined: Thu Nov 26, 2015 4:08 am
Re: Reset pins to low level on reboot??
If the voltage on the ESP32 goes too low, the ESP browns out and random stuff can happen. The proper way to fix this is to change your design: either make sure the ESP power supply is properly buffered so it doesn't dip down when the motor starts, or add a voltage monitor that properly resets the ESP if the power goes too low.
Who is online
Users browsing this forum: No registered users and 76 guests