Updated
Two languages run on the boards beginners learn with. C++ is what Uno-style boards like the HERO Board run, and what most microcontroller tutorials and libraries are written in. MicroPython is Python, slimmed down to fit on a chip like the one on the Raspberry Pi Pico.
Either one will teach you how code controls hardware. They feel very different to write, though, and they don't run on the same boards. Here is the same program in both, then the trade-offs that actually matter once you're at the desk.
A push button lights an LED for as long as you hold it down. First in C++ on the HERO Board, from the Cogsworth City course. Then in MicroPython on a Raspberry Pi Pico WH, from Neon Realm.
const int buttonPin = 2; // the push button
const int ledPin = 13; // the LED
int buttonState = 0;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop() {
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) { // the pull-down makes HIGH mean "pressed"
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
}from machine import Pin
led = Pin(15, Pin.OUT)
button = Pin(16, Pin.IN, Pin.PULL_DOWN)
while True:
if button.value() == 1:
led.on()
else:
led.off()Line for line they do the same job: set up a pin for the LED and a pin for the button, then check the button forever and switch the LED to match. Three differences already show:
setup(), which runs once, and loop(), which runs forever. MicroPython runs top to bottom, so the forever part is a while True: loop you write yourself.const int buttonPin = 2;. Python just assigns: led = Pin(15, Pin.OUT).A fourth difference hides in the wiring. The HERO Board version needs a 10 kΩ pull-down resistor on the breadboard to hold the button's pin LOW until it's pressed. The Pico's chip has pull-down resistors built in, so Pin.PULL_DOWN replaces the part. That one's the board, not the language: the ATmega328P only has built-in pull-ups. Expect a few of those when you switch.

| To do this | C++ on the HERO Board | MicroPython on the Pico |
|---|---|---|
| Make a pin an output | pinMode(13, OUTPUT); | led = Pin(15, Pin.OUT) |
| Turn it on | digitalWrite(13, HIGH); | led.on() |
| Wait one second | delay(1000); | time.sleep(1) |
| Read a button | digitalRead(2) | button.value() |
| Read a light sensor | analogRead(A0): 0 to 1023 | adc.read_u16(): 0 to 65535 |
| Print a value | Serial.println(x); | print(x) |
| Repeat forever | void loop() { } | while True: |
| Group lines into a block | Braces { } | Indentation |
| Write a comment | // like this | # like this |
The light-sensor ranges differ because the HERO Board's analogRead() is 10-bit, while MicroPython's read_u16() always scales to 16 bits.
int only holds -32,768 to 32,767, which is why timing code keeps millis() in an unsigned long. A nuisance on day one; useful for good.Instant feedback. Thonny, the editor the Pico courses use, gives you a prompt connected to the board. Type a line, press Enter, and it runs on the chip straight away, with no compiling and no upload. Wire an LED to GP15 and try it:
>>> from machine import Pin
>>> led = Pin(15, Pin.OUT)
>>> led.on()
>>> led.off()More than the syntax suggests. Pins as inputs and outputs, reading a sensor, a loop that runs forever, if and else, functions, a variable that keeps count: you learn each idea once. Switching languages later means learning new spelling for ideas you already own, which is far quicker than learning them the first time.
The electronics doesn't change at all. A resistor, an LED and a button behave the same whichever language switches them. The one real difference is the board's voltage, 5 V on the HERO Board and 3.3 V on the Pico, and What resistor do I need for an LED? shows what that does to an LED.
Still torn? Write both programs above in the free browser simulator, which runs the HERO Board in C++ and the Pico in MicroPython. Whichever one you'd rather write a second program in is your answer. For the boards themselves side by side, see Uno-compatible or Raspberry Pi Pico.
Cogsworth City: HERO Starter Kit: Learn C++ on the HERO Board: twenty nights, a short film and a build each night, from the board's own light to buttons, light sensors and an RGB LED.
Python Starter Kit: Neon Realm: Learn MicroPython on a Raspberry Pi Pico WH: 20 lessons, from your first blinking light to a temperature page served over Wi-Fi.
C++. The Arduino language is C++ with a small library of functions on top, like pinMode(), digitalWrite() and delay(), and a build step that fills in the parts you'd otherwise write yourself.
No. MicroPython needs far more memory than the ATmega328P's 2 KB of RAM and 32 KB of flash. It runs on bigger chips, like the RP2040 on the Raspberry Pi Pico.
It's Python 3: the same syntax and most of the core language, with a smaller standard library and a machine module for pins and hardware. Code that sticks to the core language usually runs on both.
MicroPython reads more easily and gives faster feedback. C++ asks more of you up front and catches more mistakes before they run. Both make a fine first language, so choose by what you want to build.