ESP32 - Hello World
This tutorial instructs you how to write the first program on ESP32. You will learn how to make ESP32 print Hello World to Serial.
Hardware Used In This Tutorial
1 | × | ESP-WROOM-32 Dev Module | |
1 | × | USB Cable Type-C | |
1 | × | (Optional) DC Power Jack | |
1 | × | Breadboard | |
1 | × | Jumper Wires | |
1 | × | (Recommended) Screw Terminal Expansion Board for ESP32 | |
1 | × | (Recommended) Power Splitter For ESP32 |
Or you can buy the following sensor kits:
1 | × | DIYables Sensor Kit (30 sensors/displays) | |
1 | × | DIYables Sensor Kit (18 sensors/displays) |
Disclosure: Some of the links in this section are Amazon affiliate links, meaning we may earn a commission at no additional cost to you if you make a purchase through them. Additionally, some links direct you to products from our own brand, DIYables.
Quick Instructions
- If this is the first time you use ESP32, see how to setup environment for ESP32 on Arduino IDE.
- Do the wiring as above image.
- Connect the ESP32 board to your PC via a micro USB cable.
- Open Arduino IDE.
- Select ESP32 board
- Select ESP32 serial port (number may be different)
- Type the following code
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello World!");
delay(500);
}
- Compile and upload code to ESP32 board by clicking Upload button on Arduino IDE
- Open Serial Monitor on Arduino IDE
- See the result on Serial Monitor. It looks like the below::
COM6
Hello World!
Hello World!
Hello World!
Hello World!
Autoscroll
Clear output
9600 baud
Newline
Modifying ESP32 Code
- Replace “Hello World!” by any text, for example, “Hello esp32io.com”.
- Compile and upload code to ESP32 board by clicking Upload button on Arduino IDE
- See the result on Serial Monitor. It looks like the below:
COM6
Hello esp32io.com
Hello esp32io.com
Hello esp32io.com
Hello esp32io.com
Autoscroll
Clear output
9600 baud
Newline
Video Tutorial
Making video is a time-consuming work. If the video tutorial is necessary for your learning, please let us know by subscribing to our YouTube channel , If the demand for video is high, we will make the video tutorial.