Got a Raspberry Pi Pico? Here’s the first thing you should do


The Raspberry Pi Pico, and its newer sibling, the Pico 2, isn’t designed to be a tiny mini PC like most of the Raspberry Pi family. Instead, it is designed for hardware projects and embedded applications. This is how to get started with one.

Your first Pico project should be as simple as possible

Learn the process first

Starting with the Pico can be daunting. It is quite different from the rest of the Raspberry Pi family. I’d always recommend starting with the basics.

Instead of wiring up several components at once and chasing a million different problems, focus on one thing that touches every part of the system: make an LED blink.

That simple task takes you through the entire setup process and equips you to start adding additional hardware and more complex software, and it guarantees that troubleshooting will be pretty straightforward.

The basic Pico Process

If you’ve spent time with a Raspberry Pi, your first instinct is going to be to install some operating system. The Pico doesn’t work that way. It’s a minimalist microcontroller. It doesn’t have an “operating system” at all.

Here are the basic steps you take instead:

Flash firmware — write the RP2040 or RP2350 with a tiny bit of software that tells it how to interpret code

Upload scripts directly — copy your MicroPython code directly to the Pico via USB.

Run code in real time — the Pico executes your instructions.

The first thing you should set up isn’t software on the Pico itself, but the software on your PC.

Getting the Pico ready

Connected the Pico to your PC

The first thing you need to do is get your Pico into a state where it can exchange information with your PC. To begin, hold the BOOTSEL button on the board and plug the Pico into your PC using a USB cable without letting go of the button.

If you do it correctly, the Pico will show up as removable storage on your PC, just like a flash drive or external SSD.

Tip: If the Pico doesn’t appear, make sure your cable supports data. A charge-only cable will let power through but won’t transfer data, so nothing will happen.

Once it is visible, you’re ready to set up an IDE and flash the firmware.

Install an easy IDE

There are a ton of IDEs that you can use to program a Pico, but I’d recommend starting with Thonny. It is simple, easy to use, and a ton of the content aimed at beginner Pico projects uses it.

Unlike Visual Studio Code or other advanced editors that require a more setup, Thonny comes pre-configured with MicroPython support. That means you can upload code to the Pico with one click and see it run immediately.

Flash MicroPython onto the Pico

You can program the Pico with multiple languages, but MicroPython is a good place to start, since it is a trimmed-down version of Python 3. The language is easy to read and well-documented.

To flash your Pico, start by downloading the UF2 (firmware) file from the Raspberry Pi website. Once it is downloaded, copy and paste the file to the Pico using File Explorer.

The Pi Pico 2 W visible in File Explorer.

I have a Pi Pico 2 W, so I downloaded the firmware for that instead.

If the Pico disappears, just unplug it, hold the BOOTSEL button again, and plug it back in. It’ll reappear.

The Pico will automatically reboot and disconnect once the copy finishes, and that’s it—you’re running MicroPython.

Once the firmware is installed, you can start writing code.

Writing your first code

Tell your IDE to talk to the Pi

By default, Thonny should pick up your Pico. However, if it doesn’t, go to Tools > Options > Interpreter, and then select MicroPython (Raspberry Pi Pico) from the drop-down menu.

Select MicroPython for the Pi Pico.

Once the interpreter is set correctly, the IDE will talk straight to the Pico, and you’ll see a live Python console (REPL) that lets you type commands.

The simplest test on any microcontroller is to make the built-in LED flash.

Paste this into Thonny:

from picozero import pico_led
pico_led.blink()

Press Run (the green arrow) at the top.

If you’ve set Thonny to MicroPython (Raspberry Pi Pico) and the board is powered on, the Pico’s built-in LED will start blinking.

Once that is done, I’d recommend connecting the Pico to a breadboard and wiring up an external LED. The code for that will also be quite simple.

from picozero import LED
led = LED(15)
led.blink()

The external LED should start blinking. If it doesn’t, double-check all of your connections to be sure everything is connected properly.


Simple is the best beginning

It might seem like a waste of time to start with something so simple, but when you’re working with a Pico, the basic process is as important as the detailed code and elaborate hardware.

Once you know how to get everything running reliably, it is easier to draw from other designs you find on the internet to implement your own version.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


Do you ever walk past a person on the streets exhibiting mental health issues and wonder what happened to their family? I have a brother—or at least, I used to. I worry about where he is and hope he is safe. He hasn’t taken my call since 2014.

James and his brother as young children playing together before his brother became sick. James is on the right and his brother is on the left.

James and his brother as young children playing together before his brother became sick. James is on the right and his brother is on the left.

When I was 13, I had a very bad day. I was in the back of the car, and what I remember most was the world-crushing sound violently panging off every surface: he was pounding his fists into the steering wheel, and I worried it would break apart. He was screaming at me and my mother, and I remember the web of saliva and tears hanging over his mouth. His eyes were red, and I knew this day would change everything between us. My brother was sick.

Nearly 20 years later, I still have trouble thinking about him. By the time we realized he was mentally ill, he was no longer a minor. The police brought him to a facility for the standard 72-hour hold, where he was diagnosed with paranoid delusional schizophrenia. Concluding he was not a danger to himself or others, they released him.

There was only one problem: at 18, my brother told the facility he was not related to us and that we were imposters. When they let him out, he refused to come home.

My parents sought help and even arranged for medication, but he didn’t take it. Before long, he disappeared.

My brother’s decline and disappearance had nothing to do with the common narratives about drug use or criminal behavior. He was sick. By the time my family discovered his condition, he was already 18 and legally independent from our custody.

The last time he let me visit, I asked about his bed. I remember seeing his dirty mattress on the floor beside broken glass and garbage. I also asked about the laptop my parents had gifted him just a year earlier. He needed the money, he said—and he had maxed out my parents’ credit card.

In secret from my parents, I gave him all the cash I had saved. I just wanted him to be alright.

My parents and I tried texting and calling him; there was no response except the occasional text every few weeks. But weeks turned into months.

Before long, I was graduating from high school. I begged him to come. When I looked in the bleachers, he was nowhere to be seen. I couldn’t help but wonder what I had done wrong.

The last time I heard from him was over the phone in 2014. I tried to tell him about our parents and how much we all missed him. I asked him to be my brother again, but he cut me off, saying he was never my brother. After a pause, he admitted we could be friends. Making the toughest call of my life, I told him he was my brother—and if he ever remembers that, I’ll be there, ready for him to come back.

I’m now 32 years old. I often wonder how different our lives would have been if he had been diagnosed as a minor and received appropriate care. The laws in place do not help families in my situation.

My brother has no social media, and we suspect he traded his phone several years ago. My family has hired private investigators over the years, who have also worked with local police to try to track him down.

One private investigator’s report indicated an artist befriended my brother many years ago. When my mother tried contacting the artist, they said whatever happened between them was best left in the past and declined to respond. My mom had wanted to wish my brother a happy 30th birthday.

My brother grew up in a safe, middle-class home with two parents. He had no history of drug use or criminal record. He loved collecting vintage basketball cards, eating mint chocolate chip ice cream, and listening to Motown music. To my parents, there was no smoking gun indicating he needed help before it was too late.

The next time you think about a person screaming outside on the street, picture their families. We need policies and services that allow families to locate and support their loved ones living with mental illness, and stronger protections to ensure that individuals leaving facilities can transition into stable care. Current laws, including age-based consent rules, the limits of 72-hour holds, and the lack of step-down or supported housing options, leave too many families without resources when a serious diagnosis occurs.

Governments and lawmakers need to do better for people like my brother. As someone who thinks about him every day, I can tell you the burden is too heavy to carry alone.

James Finney-Conlon is a concerned brother and mental health advocate. He can be reached at [email protected].



Source link