Intro to Raspberry Pi Pico and RP2040 - MicroPython Part 1: Blink | Digi-Key Electronics

Аватар автора
Python энергия
The Raspberry Pi Pico is Raspberry Pi’s first microcontroller board, based on their custom RP2040 chip. It uses a dual-core Arm Cortex-M0+ and is capable of running a variety of languages. In this series, we will look at MicroPython, which is one of the languages officially supported by Raspberry Pi. In this tutorial, we will use MicroPython to first run the popular “Hello, World!” program. We can experiment with commands by using the REPL that comes with the MicroPython firmware. REPL allows us to run one command at a time on the Pico to see what happens. This can be useful for trying functions before writing a full program. We use Thonny as the development environment, as it officially supports the Pico. We can write programs in Thonny as well as interact with the REPL. Uploading programs to the Pico consists of saving the program as main.py on the Pico’s filesystem. Whichever file is named “main.py” will be run on boot. Next, we run the classic “blinky” program to toggle the Pico’s onboard LED on and off. Blinky is the “Hello, World!” of the embedded world. We can use the machine library (module) that comes with MicroPython to control pins. The following documentation are the official guides from Raspberry Pi: Product Links: Related Videos: Related Project Links: Related Articles: Learn more:

0/0


0/0

0/0

0/0