Arduino Nano ESP32 - Hello World
This tutorial provides instructions on how to write the first program on Arduino Nano ESP32. You will learn how to make Arduino Nano ESP32 print Hello World to Serial.
Hardware Preparation
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 provided in this section are Amazon affiliate links. We may receive a commission for any purchases made through these links at no additional cost to you.
Additionally, some of these links are for products from our own brand, DIYables.
Additionally, some of these links are for products from our own brand, DIYables.
Detailed Instructions
- If this is the first time you use Arduino Nano ESP32, see how to setup environment for Arduino Nano ESP32 on Arduino IDE.
- Do the wiring as above image.
- Connect the Arduino Nano ESP32 board to your PC via a USB cable.
- Open Arduino IDE.
- Select Arduino Nano ESP32 board
- Select Arduino Nano 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 Arduino Nano ESP32 board by clicking Upload button on Arduino IDE
- Open Serial Monitor on Arduino IDE
- Check out the result on the Serial Monitor. It looks like the below::
COM6
Hello World!
Hello World!
Hello World!
Hello World!
Autoscroll
Clear output
9600 baud
Newline
Modifying Arduino Nano ESP32 Code
- Replace “Hello World!” by any text, for example, “Hello newbiely.com”.
- Compile and upload code to Arduino Nano ESP32 board by clicking Upload button on Arduino IDE
- Check out the result on the Serial Monitor. It looks like the below:
COM6
Hello newbiely.com
Hello newbiely.com
Hello newbiely.com
Hello newbiely.com
Autoscroll
Clear output
9600 baud
Newline