Blink an LED: Blocks, Arduino C++, ESP32 or ESP8266?
Quick answer
- Choose mBlock blocks if you've never coded before.
- Choose Arduino C++ if you want to learn real Arduino code.
- Choose ESP32 if you want to go on to the Internet of Things.
- Choose ESP8266 NodeMCU if a NodeMCU is what you have.
Start with blocks if typing feels hard, otherwise with Arduino C++. Keep the ESP boards for your second week: the LED is the same, but there's more to install.
Side by side
mBlock blocks
- Who it's for
- Ages 8 to 13, no coding yet
- Level
- beginner
- Cost
- Low
- Main parts
- Arduino Uno, USB cable, LED
- Wiring
- Easy
- Code
- Drag blocks, no typing
- It can
- Blink one LED or two in turn, with a simulator in the lesson
- It can't
- Show you real C++ typing
Arduino C++
- Who it's for
- Beginners ready to type
- Level
- beginner
- Cost
- Low
- Main parts
- Arduino Uno, breadboard, LED, 330 Ω resistor, 2 jumpers
- Wiring
- Easy
- Code
- About 20 lines to blink, 34 to fade
- It can
- Blink and fade, each line explained, with a simulator
- It can't
- Wi-Fi or Bluetooth
ESP32
- Who it's for
- Students who know a little Arduino
- Level
- intermediatebeginner
- Cost
- Medium
- Main parts
- ESP32, LED, push button, two 1 kΩ resistors, breadboard
- Wiring
- Medium
- Code
- About 23 lines, plus setting up the ESP32 board package first
- It can
- Control the LED with a button, and grow into Wi-Fi projects
- It can't
- Start without installing the ESP32 package
ESP8266 NodeMCU
- Who it's for
- Makers who already have a NodeMCU
- Level
- intermediate
- Cost
- Low
- Main parts
- ESP8266, LED, push button, 220 Ω and 10 kΩ resistors, breadboard
- Wiring
- Medium
- Code
- About 29 lines, plus the ESP8266 board package
- It can
- Button-controlled LED on a small Wi-Fi board
- It can't
- Bluetooth: this board has none
Written from the parts lists and code in these tutorials. Cost is a rough guide to the parts they list, compared with each other; line counts are of the main program.

