Waveshare Pico-RGB-LED with a Raspberry Pi via Thonny on Archlinux

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:

Have fun!

https://www.twilio.com/blog/programming-raspberry-pi-pico-microcontroller-micropython

https://thepihut.com/blogs/raspberry-pi-tutorials/how-to-use-the-waveshare-rgb-full-colour-led-matrix-panel-for-raspberry-pi-pico-part-1

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.