Introduction: How to Get Started With Raspberry Pi Pico W in 2024 | Write Your First LED Blink Program
If you’re new to the world of microcontrollers or looking to dive into the latest advancements, this step-by-step guide will help you get started with Raspberry Pi Pico and embark on your coding journey. From setting up your development environment to diving into hands-on projects, this guide will equip you with the knowledge and skills to unlock the full potential of Raspberry Pi Pico.
Supplies
- Raspberry Pi Pico: Choose the Pico H or W variant for pre-soldered headers.
- Micro-USB Cable: For connecting the Pico to your computer.
- Thonny Python IDE: A user-friendly IDE for writing MicroPython code
Step 1: Connecting the Raspberry Pi Pico
- Connect the Raspberry Pi Pico to your computer using the Micro-USB cable by pressing the Boot shell button.
- Your computer should recognize the Pico as an external device.
- You need to go to download the latest firmware https://micropython.org/download/
- Look for Pico Raspberry Pi and click to find the latest available firmware
- Download the latest xxx.uf2 firmware from the Releases
Step 2: Download and Setup the Thonny IDE
- To download the Thonny you need to go to it’s official website https://thonny.org/
- Click on download as per your operation system
- Install the Thonny IDE from your downloaded folder
- Open the Thonny and click on Run -> Configure Interpreter
- You need to choose MicroPython (Raspberry Pi Pico) from the list and also choose the PORT for Raspberry Pi Pico
Step 3: Writing Your First LED Blinking Program in Pi Pico
import machine
import time
led = machine.Pin('LED', machine.Pin.OUT)
while True:
led.on()
time.sleep(0.5)
led.off()
time.sleep(0.5)
Step 4: Running Your Program
- Click on Save button form Menu bar
- Popup will come up and will ask where you want to save the code
- Save your MicroPython script on the Pico by giving name as “blink.py“.
- Run the script and observe the onboard LED blink, it should started blinking in every half second.
Check out this detailed guide: How To Get Started with Raspberry Pi Pico in 2024
Step 5: Support
If I have provided a real value for you, consider buying me a coffee☕