Espressif ESP32 DEV boards are still scarce and sold in single quantities for the "cant wait hardcore developers" only, while the ESP32 IDF SDK & Arduino port are under heavy construction. Obviously these early developers don't need a noobs guide to ESP32 Arduino flashing, however as ESP32 becomes more and more popular, newbies will get it in their hands too, and will need help to get the basics right.
This project is about the simple few steps required to start programming an ESP32 Dev board from the Arduino IDE running in MS Windows 10.
Assuming a vanilla Windows machine, you need to download Arduino IDE (e.g. 1.6.12), Python 2.7 (e.g. 2.7.12) and also install pyserial (e.g. 3.2.1). Btw, when installing python, add it in the environment path to make life simple.
Installing pyserialTo install pyserial, download the .tar.gz
(e.g. pyserial-3.2.1.tar.gz
) which you need to un-compress twice (.gz
and then .tar
) using 7-zip and install the package from windows command prompt (CMD) by running:
python setup.py install
Now, lets move on to the Arduino IDE. At some point ESP32 will be available in the Arduino "boards manager" however currently it is not, so you need to manually copy/paste the ESP32 Arduino core, to the Arduino IDE directory. So, install Arduino IDE then find the hardware subdirectory (e.g. C:\arduino-1.6.12\hardware) create an esspresif directory, with an esp32 directory inside and then extract the zip with contents of the ESP32 Arduino Core.
Again, via command prompt, got to the ESP32 folder, in the tools directory and execute:
python get.py
Launch Arduino IDE, select board ESP32 Dev Module compile (verify) an empty sketch to make sure everything is okay so far.
Write some serial output in the setup like this:
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(115200);
Serial.println("Hello ESP32 World!");
}
void loop() {
// put your main code here, to run repeatedly:
}
TestingInsert ESP32 in a USB, select port, press upload and expect to see following screenshot, hopefully:
Go ahead and test something WiFi related:
Now you are all set for killer IoT apps! Eehh almost, you will have to wait for the arduino-esp32
core to evolve. New commits are coming almost every day, so it wont be long until we see more advanced examples.
Follow me here and on twitter: https://twitter.com/nikil511 for more updates.
Comments