I wired it up as shown in the course material. The code compiles and uploads just fine. I push the EN button and it starts running. It gets the time and temperature and logs them to the SD just fine. When it comes out of deep sleep, it sits printing dots to the serial monitor saying it can’t connect to the WIFI. Pushing EN again connects just fine.
There are some posts on ESP32 forums that suggest it could be an EMI problem that some of the pins are sensitive to false signals.
It seems that your ESP32 is having issues trying to reconnect after deep sleep.
I’ve read that this can help:
“Try adding a call to .disconnect() before putting the ESP32 to sleep, and calling .reconnect() after it wakes up.”
What ESP32 are you using?
Thank you so much, Sara. that solved the problem. WiFy.disconnect/reconnect (); was the key. I’m learning so much through your great courses and appreciate your quick response!
I using a DOIT ESP32 dev kit V1.
So far, I’ve had to press the EN button to run a program. Is there a way to set it to run on power on?
I’m glad that solved the problem. I though that was an issue only with the huzzah32, but it seems that it happens with other boards too. I have no idea why??! My boards work fine (DOIT ESP32 dev Kit V1).
As for the other question: did you have to press the BOOT button to upload code?
On the boards that I need to press the BOOT button, the code doesn’t run automatically, I need to press the EN button so the code starts running.
For the boards that don’t need to press the BOOT button to upload code, the code runs straight away once uploaded.
So, I think that if you follow what is described here, it will resolve your issue: https://randomnerdtutorials.com/solved-failed-to-connect-to-esp32-timed-out-waiting-for-packet-header/
Thank you Sara. I have the 10 uF cap installed from EN to GND and so it always uploads just fine without pushing the boot button. In reading the link you sent I found that pulling the EN pin up to 3.3 volts fixed the autorun problem. I used 3.3k and now it autoruns just fine.
Now I can move on to learn great stuff!