NodeMCU Basic Project-Hello World

by osoyooproduct in Circuits > Microcontrollers

10207 Views, 5 Favorites, 0 Comments

NodeMCU Basic Project-Hello World

NodeMCU IOT Kit Lesson 2: Hello World

This article will introduce how to upload the first sketch to the NodeMCU.

After uploading this sketch and clicking serial monitor button, you will see the serial; monitor output"Hello World" every second.

Preparation

Hardware:

NodeMCU x1

USB Cable x 1

PC x1

Software: please refer to our last article:https://www.instructables.com/id/How-to-Program-NodeMCU-on-Arduino-IDE/

Code

1.jpg
2.jpg
3.jpg

-Connect your NodeMCU to the PC and put below code to your Arduino IDE .

void setup()
{ Serial.begin(115200);//Set the baudrate to 115200,same as the software settings } void loop() { Serial.println("Hello World!");//Print character string“Hello World!”on the serial delay(5000);// Delay 5 second }

-Choose corresponding board/port for your project,upload the sketch to the board.

-After upload down,click Serial Monitor button, you'll see the serial monitor output every 5 second.

Note: Make sure the baudrate is same as your sketch setting.