{"id":1987,"date":"2023-12-06T20:18:05","date_gmt":"2023-12-06T19:18:05","guid":{"rendered":"https:\/\/hannes.enjoys.it\/blog\/?p=1987"},"modified":"2023-12-06T20:18:30","modified_gmt":"2023-12-06T19:18:30","slug":"waveshare-pico-rgb-led-with-a-raspberry-pi-via-thonny-on-archlinux","status":"publish","type":"post","link":"https:\/\/hannes.enjoys.it\/blog\/2023\/12\/waveshare-pico-rgb-led-with-a-raspberry-pi-via-thonny-on-archlinux\/","title":{"rendered":"Waveshare Pico-RGB-LED with a Raspberry Pi via Thonny on Archlinux"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.waveshare.com\/wiki\/Pico-RGB-LED\">https:\/\/www.waveshare.com\/wiki\/Pico-RGB-LED<\/a> is horribly broken and this was hard to Google so hopefully this helps *you* or future-me.<\/p>\n\n\n\n<p>I did not manage to put the display directly on top of the Pico as a hat. Also my display&#8217;s board has its pins numbered and labelled mirrored when comparing to the official pin out. FFS&#8230;!?<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Install <code>pico-sdk<\/code> and <code>thonny<\/code> from AUR.<\/p>\n\n\n\n<p><code>$ sudo usermod -a -G uucp $USER<\/code><\/p>\n\n\n\n<p>Reboot.<\/p>\n\n\n\n<p>Make sure you aren&#8217;t full of static electricity. Hold the BOOTSEL button on your PI and connect it to your PC using a USB cable.<\/p>\n\n\n\n<p>It should appear as storage device.<\/p>\n\n\n\n<p>Start Thonny, select &#8220;Micropython (Raspberry Pi Pico)&#8221; as interpreter and use its &#8220;Install or update MicroPython&#8221; option. This does that &#8220;copy some RPI_PICO-20231005-v1.21.0.uf2 file to your Pico in mass storage mode&#8221; step for you.<\/p>\n\n\n\n<p>The Thonny shell should say something like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">MicroPython v1.21.0 on 2023-10-06; Raspberry Pi Pico with RP2040\nType \"help()\" for more information.\n>>><\/code><\/pre>\n\n\n\n<p>Enter the following code in your Thonny shell (<a href=\"https:\/\/www.twilio.com\/blog\/programming-raspberry-pi-pico-microcontroller-micropython\">via<\/a>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">from machine import Pin\nled = Pin(25, Pin.OUT)\nled.on()<\/code><\/pre>\n\n\n\n<p>The Pico&#8217;s green LED should glow now. Use <code>led.off()<\/code> to turn it off again.<\/p>\n\n\n\n<p>Unplug your Pico. Make sure you aren&#8217;t full of static electricity.<\/p>\n\n\n\n<p>Connect your Pico and Waveshare Pico-RGB-LED like described in <a href=\"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:\/\/thepihut.com\/blogs\/raspberry-pi-tutorials\/how-to-use-the-waveshare-rgb-full-colour-led-matrix-panel-for-raspberry-pi-pico-part-1<\/a>:<\/p>\n\n\n\n<p>On the display there are four pins in a length-wise direction on the board.<\/p>\n\n\n\n<p>Connect: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The display&#8217;s 5V to your Pico&#8217;s VBUS (pin 40)<\/li>\n\n\n\n<li>The display&#8217;s GND to your Pico&#8217;s GND (pin 38)<\/li>\n\n\n\n<li>The display&#8217;s DIN to your Pico&#8217;s GP6 (pin 9)<\/li>\n<\/ul>\n\n\n\n<p>References:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/datasheets.raspberrypi.com\/pico\/Pico-R3-A4-Pinout.pdf\">https:\/\/datasheets.raspberrypi.com\/pico\/Pico-R3-A4-Pinout.pdf<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.waveshare.com\/w\/upload\/4\/42\/Pico-RGB-LED-details-inter.jpg\">https:\/\/www.waveshare.com\/w\/upload\/4\/42\/Pico-RGB-LED-details-inter.jpg<\/a><\/li>\n<\/ul>\n\n\n\n<p>Have fun!<\/p>\n\n\n\n<p><a href=\"https:\/\/www.twilio.com\/blog\/programming-raspberry-pi-pico-microcontroller-micropython\">https:\/\/www.twilio.com\/blog\/programming-raspberry-pi-pico-microcontroller-micropython<\/a><\/p>\n\n\n\n<p><a href=\"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:\/\/thepihut.com\/blogs\/raspberry-pi-tutorials\/how-to-use-the-waveshare-rgb-full-colour-led-matrix-panel-for-raspberry-pi-pico-part-1<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/docs.micropython.org\/en\/latest\/esp8266\/tutorial\/neopixel.html\">https:\/\/docs.micropython.org\/en\/latest\/esp8266\/tutorial\/neopixel.html<\/a><\/p>\n\n\n\n<p>To make a script launch upon booting, save it with Thonny to the Pico with the name <code>main.py<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s board has its pins numbered and labelled mirrored when comparing to the official pin out. FFS&#8230;!? Install pico-sdk [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,12,43,36],"tags":[],"class_list":["post-1987","post","type-post","status-publish","format-standard","hentry","category-guide","category-linux","category-python","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/1987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/comments?post=1987"}],"version-history":[{"count":1,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/1987\/revisions"}],"predecessor-version":[{"id":1988,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/1987\/revisions\/1988"}],"wp:attachment":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/media?parent=1987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/categories?post=1987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/tags?post=1987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}