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


Google Maps has a long list of hidden (and sometimes, just underrated) features that help you navigate seamlessly. But I was not a big fan of using Google Maps for walking: that is, until I started using the right set of features that helped me navigate better.

Add layers to your map

See more information on the screen

Layers are an incredibly useful yet underrated feature that can be utilized for all modes of transport. These help add more details to your map beyond the default view, so you can plan your journey better.

To use layers, open your Google Maps app (Android, iPhone). Tap the layer icon on the upper right side (under your profile picture and nearby attractions options). You can switch your map type from default to satellite or terrain, and overlay your map with details, such as traffic, transit, biking, street view (perfect for walking), and 3D (Android)/raised buildings (iPhone) (for buildings). To turn off map details, go back to Layers and tap again on the details you want to disable.

In particular, adding a street view and 3D/raised buildings layer can help you gauge the terrain and get more information about the landscape, so you can avoid tricky paths and discover shortcuts.

Set up Live View

Just hold up your phone

A feature that can help you set out on walks with good navigation is Google Maps’ Live View. This lets you use augmented reality (AR) technology to see real-time navigation: beyond the directions you see on your map, you are able to see directions in your live view through your camera, overlaying instructions with your real view. This feature is very useful for travel and new areas, since it gives you navigational insights for walking that go beyond a 2D map.

To use Live View, search for a location on Google Maps, then tap “Directions.” Once the route appears, tap “Walk,” then tap “Live View” in the navigation options. You will be prompted to point your camera at things like buildings, stores, and signs around you, so Google Maps can analyze your surroundings and give you accurate directions.

Download maps offline

Google Maps without an internet connection

Whether you’re on a hiking trip in a low-connectivity area or want offline maps for your favorite walking destinations, having specific map routes downloaded can be a great help. Google Maps lets you download maps to your device while you’re connected to Wi-Fi or mobile data, and use them when your device is offline.

For Android, open Google Maps and search for a specific place or location. In the placesheet, swipe right, then tap More > Download offline map > Download. For iPhone, search for a location on Google Maps, then, at the bottom of your screen, tap the name or address of the place. Tap More > Download offline map > Download.

After you download an area, use Google Maps as you normally would. If you go offline, your offline maps will guide you to your destination as long as the entire route is within the offline map.

Enable Detailed Voice Guidance

Get better instructions

Voice guidance is a basic yet powerful navigation tool that can come in handy during walks in unfamiliar locations and can be used to ensure your journey is on the right path. To ensure guidance audio is enabled, go to your Google Maps profile (upper right corner), then tap Settings > Navigation > Sound and Voice. Here, tap “Unmute” on “Guidance Audio.”

Apart from this, you can also use Google Assistant to help you along your journey, asking questions about your destination, nearby sights, detours, additional stops, etc. To use this feature on iPhone, map a walking route to a destination, then tap the mic icon in the upper-right corner. For Android, you can also say “Hey Google” after mapping your destination to activate the assistant.

Voice guidance is handy for both new and old places, like when you’re running errands and need to navigate hands-free.

Add multiple stops

Keep your trip going

If you walk regularly to run errands, Google Maps has a simple yet effective feature that can help you plan your route in a better way. With Maps’ multiple stop feature, you can add several stops between your current and final destination to minimize any wasted time and unnecessary detours.

To add multiple stops on Google Maps, search for a destination, then tap “Directions.” Select the walking option, then click the three dots on top (next to “Your Location”), and tap “Edit Stops.” You can now add a stop by searching for it and tapping “Add Stop,” and swap the stops at your convenience. Repeat this process by tapping “Add Stops” until your route is complete, then tap “Start” to begin your journey.

You can add up to ten stops in a single route on both mobile and desktop, and use the journey for multiple modes (walking, driving, and cycling) except public transport and flights. I find this Google Maps feature to be an essential tool for travel to walkable cities, especially when I’m planning a route I am unfamiliar with.


More to discover

A new feature to keep an eye out for, especially if you use Google Maps for walking and cycling, is Google’s Gemini boost, which will allow you to navigate hands-free and get real-time information about your journey. This feature has been rolling out for both Android and iOS users.



Source link