NodeMCU Basic Project-Hello World

9.6K52

Intro: NodeMCU Basic Project-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.

STEP 1: 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/

STEP 2: Code

-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.