Duration 9:25

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

20 737 watched
0
456
Published 12 Apr 2021

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: Raspberry Pi Pico Datasheet: https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf Raspberry Pi Pico Python SDK: https://datasheets.raspberrypi.org/pico/raspberry-pi-pico-python-sdk.pdf Product Links: https://www.digikey.com/en/products/detail/raspberry-pi/SC0915/13684020 Related Videos: Intro to MicroPython - /watch/gI7XnSCNnv3NX Intro to Raspberry Pi Pico and RP2040 - MicroPython Part 1 - /watch/UQ5HCaQ9kCJ9H Intro to Raspberry Pi Pico and RP2040 - MicroPython Part 2 - /watch/Ek6zAszdK4bdz Intro to Raspberry Pi Pico and RP2040 - MicroPython Part 3 - /watch/wFCi9vpQMrPQi Related Project Links: Written tutorial - https://www.digikey.com/en/maker/projects/raspberry-pi-pico-and-rp2040-micropython-part-1-blink/58b3c31ac93649849b58824caa00529c Related Articles: Introduction to MicroPython - https://www.digikey.com/en/maker/blogs/2018/introduction-to-micropython Learn more: Maker.io - https://www.digikey.com/en/maker Digi-Key’s Blog – TheCircuit https://www.digikey.com/en/blog Connect with Digi-Key on Facebook https://www.facebook.com/digikey.electronics/ And follow us on Twitter https://twitter.com/digikey

Category

Show more

Comments - 31
  • @
    @JSStrom3 years ago Very nice presentation.
    feel like i' m back in college, but only far better. Awesome!
    5
  • @
    @christof55213 years ago Thanks for the great and short introduction. I heard about micropython and the pi pico, but never had the time to have a look into it. I am looking forward . ...Expand 2
  • @
    @ZsomborZsombibi3 years ago So it' s not locked to upy. Getting interested now. Hope to see the platdormio integration for full freedom: 1
  • @
    @Mohamm-ed3 years ago Amazing series shwan. Could you please focus more on tinyml. Really you are the best one. 2
  • @
    @SoggyCashew2 years ago How do i put the pico running micropython into dormmate after running a loop then using a button to wake it?
  • @
    @FruchtcocktailUndCo3 years ago Nice! Please take a look into debugging via swd. 2
  • @
    @kamalkannan22603 years ago Could you please do some machine learning examples using rpi pico and edge impulse? 1
  • @
    @NomenNescio993 years ago For every project i can imagine myself using the pico, i also find that i can use the attiny at a fraction of the cost.
    i just don' t understand the purpose of the pico.
  • @
    @piconano3 years ago Hope you will cover the c/c++ dev environment as well.
    is it more powerful than the esp32? Same?
    1
  • @
    @peterbelanger40942 years ago Doesn' t work for me. I am using the exact same code, only difference is i am using micropython 1. 19, not 1. 14
    it says invalid syntax on line it carefully tired twice, nothing works, i can' t do this.
    nothing is going right for me with this stuff. I need to just give up
    .
    ...Expand
  • @
    @tubeDude482 years ago Pin 25does not work on a pi pico w,you have to use if using thonny. You didn' t un-comment machine!
  • @
    @lancekraakman14273 years ago I ordered some components and almost immediately i needed to add another
    component. They said they couldn' t do this (shortly after my original order) and suggested i had to make another order (and pay a huge 26$
    shipping fee) terrible customer service. I suggest you work on this before posting videos!
    .
    ...Expand