ESP8266 - Hello World

Hardware Preparation

1×ESP8266 NodeMCU
1×USB Cable Type-C
1×Recommended: Screw Terminal Expansion Board for ESP8266
1×Recommended: Power Splitter for ESP8266 Type-C

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 .

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.
Arduino IDE - How to select ESP8266 NodeMCU board
  • Choose the serial port associated with ESP8266 (the number may vary).
Arduino IDE - How to select com port
  • 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.
How to upload code to ESP8266 NodeMCU using Arduino IDE
  • Click on the Serial Monitor icon to open it.
Arduino IDE - How to open serial monitor
  • View the outcome in the Serial Monitor.
COM6
Send
Hello World! I am ESP8266! Hello World! I am ESP8266! Hello World! I am ESP8266! Hello World! I am ESP8266!
Autoscroll Show timestamp
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
Send
ESP8266 Get Started
Autoscroll Show timestamp
Clear output
9600 baud  
Newline  

Video Tutorial

Function References

. Congratulations!
. You have accomplished the initial step in your ESP8266 education experience. Keep going!

※ OUR MESSAGES

  • As freelancers, We are AVAILABLE for HIRE. See how to outsource your project to us
  • Please feel free to share the link of this tutorial. However, Please do not use our content on any other websites. We invested a lot of effort and time to create the content, please respect our work!