By Kevin McAleer, 4 Minutes
Page last updated November 20, 2026

Your board has MicroPython on it. Let’s get Snakie talking to it and run a program on real hardware.
Snakie is still connected to the simulated device, and it only talks to one device at a time. Click Disconnect, the button beside the device list above the console.
The console wakes up with MicroPython’s greeting and a >>> prompt, and the status bar at the bottom left changes from Simulated device to your board. Snakie also tells you which board it found and shows it in the Board view.
Open a new file and type the classic first hardware program:
Press Run. The little LED on your board blinks, and the console prints its state twice a second.
Pin("LED") is a handy name that means the built-in LED, wherever it is on this board. On a plain Pico that’s GP25; on a Pico W it’s wired through the WiFi chip. Using the name means the same code works on both.
This program has a while True: loop, so it will run forever. Press Stop.
Stop does the same job as Ctrl+C in the console. The program ends with a KeyboardInterrupt message, which is normal, and the >>> prompt comes back.
When nothing is running, the red button says Reset. It soft-resets the board: MicroPython starts again from clean, forgetting every variable. If there’s a main.py on the board, it runs.
Use Reset when the board seems to be in an odd state, or to check that your saved program starts by itself.
It’s worth knowing what happens when you press Run, because it explains something that confuses everyone once.
Run sends the code in the editor to the board and runs it from memory. It doesn’t save it on the board.
So if you unplug the board and power it from a battery, the program is gone. To make a program stay, you need to save it onto the board as a file, and that’s the next lesson.
| Button | What it does |
|---|---|
| Run | Runs the editor’s code on the board, without saving it there |
| Stop | Interrupts the running program |
| Reset | Soft-resets the board and runs main.py if there is one |
In the desktop app, Run is Ctrl+R and Stop is Ctrl+. (use ⌘ on a Mac).
led.on() in the console. The variable is still there.led.on() again. What happens, and why?Problem: My board isn’t in the list. Solution: Try a different cable or USB port, and close anything else that may be using the board, such as Thonny or a serial monitor. Why: Only one program can hold a serial port at a time.
Problem: The device list won’t open. Solution: Press Disconnect first. Why: The list is locked while a device is connected.
Problem: NameError: name 'led' isn't defined after a reset.
Solution: Run the program again.
Why: Reset wipes the board’s memory, so led no longer exists.
Quick quiz 1 of 2
You press Run, then unplug the board and power it from a battery. Does the program run?
main.py to make it stay.Quick quiz 2 of 2
Why use Pin("LED") instead of Pin(25)?
You can use the arrows ← → on your keyboard to navigate between lessons.
Comments