https://www.waveshare.com/wiki/Pico-RGB-LED is horribly broken and this was hard to Google so hopefully this helps *you* or future-me.
I did not manage to put the display directly on top of the Pico as a hat. Also my display’s board has its pins numbered and labelled mirrored when comparing to the official pin out. FFS…!?
Install pico-sdk
and thonny
from AUR.
$ sudo usermod -a -G uucp $USER
Reboot.
Make sure you aren’t full of static electricity. Hold the BOOTSEL button on your PI and connect it to your PC using a USB cable.
It should appear as storage device.
Start Thonny, select “Micropython (Raspberry Pi Pico)” as interpreter and use its “Install or update MicroPython” option. This does that “copy some RPI_PICO-20231005-v1.21.0.uf2 file to your Pico in mass storage mode” step for you.
The Thonny shell should say something like:
MicroPython v1.21.0 on 2023-10-06; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>>
Enter the following code in your Thonny shell (via):
from machine import Pin
led = Pin(25, Pin.OUT)
led.on()
The Pico’s green LED should glow now. Use led.off()
to turn it off again.
Unplug your Pico. Make sure you aren’t full of static electricity.
Connect your Pico and Waveshare Pico-RGB-LED like described in https://thepihut.com/blogs/raspberry-pi-tutorials/how-to-use-the-waveshare-rgb-full-colour-led-matrix-panel-for-raspberry-pi-pico-part-1:
On the display there are four pins in a length-wise direction on the board.
Connect:
- The display’s 5V to your Pico’s VBUS (pin 40)
- The display’s GND to your Pico’s GND (pin 38)
- The display’s DIN to your Pico’s GP6 (pin 9)
References:
- https://datasheets.raspberrypi.com/pico/Pico-R3-A4-Pinout.pdf
- https://www.waveshare.com/w/upload/4/42/Pico-RGB-LED-details-inter.jpg
Have fun!
https://www.twilio.com/blog/programming-raspberry-pi-pico-microcontroller-micropython
https://docs.micropython.org/en/latest/esp8266/tutorial/neopixel.html
To make a script launch upon booting, save it with Thonny to the Pico with the name main.py
.