CircuitPython with Raspberry Pi Pico – Getting Started

Build a Keyboard and Mouse Emulator, make a rainbow with RGB LEDs, and work with a microSD card – all with CircuitPython on a Raspberry Pi Pico!

Article with diagrams and code: http://bit.ly/picocp
More articles and tutorials: https://dronebotworkshop.com
Join the conversation on the forum: https://forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: https://dbot.ws/dbnews

Discuss this video on the forum – https://forum.dronebotworkshop.com/2021/circuitpython-with-raspberry-pi-pico-getting-started/

Once again we are working with the Raspberry Pi Pico, the 4-dollar microcontroller that uses the new RP2040 MCU. And today we’ll be programming it using CircuitPython.

After installing CircuitPython and the MU Editor we will build a Keyboard Emulator for the popular audio program Audacity. You can use the same technique to make a custom keypad for any application, with as many keys as you need.

Next, we emulate a mouse using a Joystick and two pushbuttons. Just because we can.

Then we hook up a microSD card module through the SPI port and learn how to create a file, write to it and read it back. All the basic operations you need to start using microSD cards in your Pico projects.

And finally, we will hook up soon addressed;e REGB LEDs, otherwise known as Neopixels, to our Pico and control them using a few Adaruit libraries and sample code. It’s a rainbow inside the workshop!

CircuitPython is a fork of MicroPython, the language we used in the previous Raspberry Pi Pico video. It was created by Adafruit and has a lot of advantages, especially for beginners.

Using CircuitPython gives us access to over 300 libraries and drivers, allowing us to work with the many features of the Raspberry Pi Pico right now.

We’ll install CircuitPython on a Pico and then work with it using the MU Editor, a Python editor designed for beginners with CircuitPython integration built-in. Of course, you can use any editor that you wish, that’s one of the strengths of CircuitPython – no special software required.

Here is what we will cover today:

00:00 – Introduction
04:13 – CircuitPython
06:47 – Installing CircuitPython on Pico
09:40 – Installing MU Editor
12:44 – Testing (Blink)
14:43 – Build a Keyboard Emulator
22:49 – Build a Mouse Emulator
28:28 – Write & Read a microSD card
34:32 – Addressable RGB Strip (Neopixels)
39:24 – Conclusion

Hope you enjoy the video and that it helps you get the most out of your Raspberry Pi Pico!

source

You might be interested in