Getting Started
Raspberry Pi Pico is a microcontroller board based on the Raspberry Pi architecture.
Introduction
Raspberry Pi Pico is a microcontroller board based on the Raspberry Pi architecture. It features a custom-designed dual-core ARM Cortex-M0+ processor, flexible I/Os, and programmable input and output (PIO) state machines. In this section, you’ll learn everything about the raspberry pi pico.
Requirements
To follow along with this tutorial, you’ll need the following:
- Raspberry Pi Pico board
- Micro-USB cable
- A computer running Windows, macOS, or Linux
Setup
Step 1: Install Thonny
Thonny is an integrated development environment (IDE) for Python that makes it easy to write and run code on Raspberry Pi Pico. To install Thonny, follow the instructions in the official documentation.
Step 2: Connect Pico to your computer
Connect your Raspberry Pi Pico board to your computer using a micro-USB cable.
Step 3: Install CircuitPython
CircuitPython is a lightweight version of Python that’s optimized for microcontrollers like Raspberry Pi Pico. To install CircuitPython, follow the instructions in the official documentation.
Step 4: Blink an LED
Now that you have Thonny and CircuitPython installed, you can blink an LED on your Raspberry Pi Pico board. Create a new file in Thonny, and copy the following code:
import time
import board
import digitalio
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = not led.value
time.sleep(0.5)
Save the file as blink.py, and run it on your Raspberry Pi Pico board. You should see the LED on your board blink on and off every half second.
Congratulations, you’ve successfully set up Raspberry Pi Pico and programmed it to blink an LED!
Conclusion
In this tutorial, you’ve learned how to get started with Raspberry Pi Pico using the Doks theme. You’ve installed Thonny and CircuitPython, and written your first program to blink an LED. From here, you can explore the many possibilities of Raspberry Pi Pico and start building your own projects.