The new Pi-Pico from Raspberry Pi has re-sparked my interest in hobby electronics - and with it a learning curve into Raspberry Pi OS Linux, Micro-Python and the Pi-Pico (where in a previous life I was using 8051 ‘C’ & Assembler with windows based tools!).
I have been watching the Core Electronics YouTube video tutorials which are great for getting the clarity of detail and avoiding the avalanche of potential confusion in trying to self-study a new topic.
So I have just invested my pocket money into a Pi 400 and a Pi-Pico from Pimoroni in the UK and in a few hours I managed to Blink the pin 25 LED.
My next goal is to drive a Pico-Unicorn 7x16 RGB LED display, but beyond using the Pimoroni Pico GitHub libraries and just doing a cut-n-paste of the relevant functions - I feel as if I am missing a large part of what is happening “under the bonnet/hood” as to how the code works.
Does anyone else have a Pico-Unicorn (or maybe the Pi-Zero or Pi-4 Hat/PHat’s) and maybe happy to share their knowledge in some way.
Welcome to the forums and thanks for making a post
I’m still learning the Pico myself (as are we all)! I always find the best way to understand what’s going on is to review the datasheets for the parts, and checkout the backends of the libraries.
Here’s the link to the github repo, where you can read through the source files for the Unicorn hat library:
The code comments are super helpful. When you see something you don’t quite understand or want to know more about, look it up in the documentation. This is written in C++, but to be honest, Micropython is where it’s at for the RP2040 / Pico.
Checkout the library of micropython examples here:
The documentation from Raspberry Pi is also an excellent place to start:
Also checkout the SDK microsite:
All this and more can be found here:
I’m really excited about this new mcu, the PIO/state machines are awesome!
Thank you oliver for the links…
Most of them I had encountered over the last few days, but the GitHub links do have some interesting examples.
As with any new topic - it is a bit like opening the box of a huge jigsaw - where when one first starts one has no idea where any of the pieces go!
I realised after posting that a good starting point for finding some of the answers is using the shell and entering trial statements (Not something that was possible back when I was using 8051)
… and yes poi looks amazing - allowing pin driving with DMA - independent of the two ARM cores!
Based on the various replies (Thank You) - And using the Pico-Unicorn demo.py on GitHub as a starting point:
Gave the required result: