For info. on how to update an already installed Arduino-ESP32 support package, please visit http://wei48221.blogspot.tw/2018/04/arduino-esp32-how-to-update-to-latest.html.
Below is the NodeMCU-32S module used for this post.
Add support for ESP32 to Arduino IDE
Follow the instruction in the link below to add support for ESP32 to Arduino IDE.
https://github.com/espressif/arduino-esp32
Upload a sample Arduino Sketch
For this post, I want to upload the Blink example.
1. Load the sketch into Arduino IDE.
2. Select NodeMCU-32S from the list of boards, select 80MHz as the Flash Frequency and 115200 as the upload speed as shown below..
3. Click the Arduino IDE upload button to compile and upload the sketch.
4. Press the Boot button on NodeMCU-32S when "Connecting....." appears on the bottom window of the Arduino IDE. Release the button after 2~3 seconds.
The red circle below is where the Boot button is located.
5. The message below indicates that the code has been uploaded and is running on the NodeMCU-32S module.
Below is the complete output message in the message window.
Sketch uses 135894 bytes (10%) of program storage space. Maximum is 1310720 bytes. Global variables use 10992 bytes (3%) of dynamic memory, leaving 283920 bytes for local variables. Maximum is 294912 bytes. esptool.py v2.1 Connecting........_____....._____....._____....._____.. Chip is ESP32D0WDQ6 (revision 1) Uploading stub... Running stub... Stub running... Configuring flash size... Auto-detected Flash size: 4MB Compressed 8192 bytes to 47... Writing at 0x0000e000... (100 %) Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 5957.9 kbit/s)... Hash of data verified. Flash params set to 0x022f Compressed 11120 bytes to 7467... Writing at 0x00001000... (100 %) Wrote 11120 bytes (7467 compressed) at 0x00001000 in 0.7 seconds (effective 133.8 kbit/s)... Hash of data verified. Compressed 202560 bytes to 76980... Writing at 0x00010000... (20 %) Writing at 0x00014000... (40 %) Writing at 0x00018000... (60 %) Writing at 0x0001c000... (80 %) Writing at 0x00020000... (100 %) Wrote 202560 bytes (76980 compressed) at 0x00010000 in 6.8 seconds (effective 238.1 kbit/s)... Hash of data verified. Compressed 3072 bytes to 122... Writing at 0x00008000... (100 %) Wrote 3072 bytes (122 compressed) at 0x00008000 in 0.0 seconds (effective 1445.7 kbit/s)... Hash of data verified. Leaving... Hard resetting...
Reference:
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
https://github.com/espressif/arduino-esp32/issues/333
No comments:
Post a Comment