Using to blink a NodeMCU’s LED.

Recently, I discovered which is a set of tools integrated in Atom editor. It allows the VERY easy management of tool chains for multiple boards. Here is my first program.

First, create a new project using the menu : "PlatformIO > Initialize or Update a project ...". Choose NodeMCU board in the assistant then add a src/main.cpp file with following content.

#include <Arduino.h>

const int LED = D0; // GPIO 16

void setup() {
 // Init LED pin as an output
 pinMode(LED, OUTPUT);

// Welcome message
 Serial.print("Hello world");

void loop() {
 digitalWrite(LED, LOW);
 digitalWrite(LED, HIGH);

Use the build and upload commands from toolbar or menu and done !
This was an easy one, wasn’t it ? All the tool chain installation crap is handled by, awesome.

Leave a Reply

Your email address will not be published. Required fields are marked *