ESP8266 - Hello World
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
To get started with ESP8266 on Arduino IDE, follow these steps:
- Check out the how to setup environment for ESP8266 on Arduino IDE tutorial if this is your first time using ESP8266.
- Wire the components as shown in the diagram.
- Connect the ESP8266 board to your computer using a USB cable.
- Open Arduino IDE on your computer.
- Choose the correct ESP8266 board, such as (e.g. NodeMCU 1.0 (ESP-12E Module)), and its respective COM port.

- Choose the serial port associated with ESP8266 (the number may vary).

- Copy the above code and open with Arduino IDE
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!");
Serial.println("I am ESP8266!");
delay(1000);
}
- Click the Upload button on the Arduino IDE to compile and upload the code to the ESP8266.

- Click on the Serial Monitor icon to open it.

- View the outcome in the Serial Monitor.
COM6
Hello World!
I am ESP8266!
Hello World!
I am ESP8266!
Hello World!
I am ESP8266!
Hello World!
I am ESP8266!
Autoscroll
Clear output
9600 baud
Newline
Modifying ESP8266 Code
- Replace “Hello World!” with a different text, such as “ESP8266 Get Started”.
- Then, upload the code to ESP8266.
- Finally, view the result on the Serial Monitor.
COM6
ESP8266 Get Started
Autoscroll
Clear output
9600 baud
Newline