micropython-max7219 icon indicating copy to clipboard operation
micropython-max7219 copied to clipboard

Pico example would be nice

Open MartinPacker opened this issue 2 years ago • 3 comments

Thank you for a very handy library. I've only just come across this device and the library to drive it.

A coding example for Raspberry Pi Pico would be nice. Perhaps one of the other ones could be used; I wouldn't know. All I know is Pin('X5') causes a syntax error on MicroPython on Pico - as it doesn't have such a pin name.

MartinPacker avatar May 31 '23 20:05 MartinPacker

The machine.Pin() class works slightly differently on each port.

On the RP2 pico port, pins are represented as integers. https://docs.micropython.org/en/latest/rp2/quickref.html#pins-and-gpio Replace the Pin('X5') with Pin(5)

X5 is a STM32 port pin number, where I originally worked on this driver.

It's been quite a few years since I worked on this. I'll add some more examples and test against the newer micropython versions.

mcauser avatar Jun 01 '23 07:06 mcauser

Thank you. Elsewhere I saw integer 5 - and it worked. Just a note would do, rather than a whole new example. Unless you want to create new examples.

MartinPacker avatar Jun 01 '23 09:06 MartinPacker

I've got plenty of unfinished unmerged ones. Just need to find some time to upgrade, polish and commit.

mcauser avatar Jun 01 '23 13:06 mcauser