Hi Rui Santos,
Referring to your tutorial ESP32 Built-in OLED Board (WEMOS Lolin32), I did try out and shows me the following error: –
Sketch uses 220260 bytes (16%) of program storage space. Maximum is 1310720 bytes. Global variables use 14364 bytes (4%) of dynamic memory, leaving 313316 bytes for local variables. Maximum is 327680 bytes. esptool.py v2.6 Serial port COM7 Connecting.... A fatal error occurred: Invalid head of packet (0x72) A fatal error occurred: Invalid head of packet (0x72)
4 Answers
Hello, that error means that your ESP32 OLED board is not in flashing mode.
- After pressing the “Upload” button in the Arduino IDE
- Hold down the BOOT button in the ESP32 to put it in flashing mode.
Regards,
Rui
Good day, Rui Santos,
After following the step, I do get the following error message:-
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "WEMOS LOLIN32, 80MHz, Default, 921600" A fatal error occurred: Timed out waiting for packet header A fatal error occurred: Timed out waiting for packet header
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "WEMOS LOLIN32, 80MHz, Default, 115200" Build options changed, rebuilding all Sketch uses 220260 bytes (16%) of program storage space. Maximum is 1310720 bytes. Global variables use 14364 bytes (4%) of dynamic memory, leaving 313316 bytes for local variables. Maximum is 327680 bytes. esptool.py v2.6 Serial port COM7 Connecting.... A fatal error occurred: Timed out waiting for packet header A fatal error occurred: Timed out waiting for packet header This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
That error means that your ESP32 is not establishing a serial communication with your computer and it fails to upload the code. I’ve encountered that error before (with many ESP32 boards) and it’s always solved by:
- Ensure that you’ve selected the ESP32 COM Port in the Tools Menu
- After you see the message “Connecting….”, you need to hold down the BOOT button until the uploading process begins
- In some cases, using a different USB cable (shorter) fixed the connection issue
- Your board might be faulty (that’s very unlikely)
Unfortunately to fix that error there’s no clear solution… It’s one of those things… Regards,
Rui