Open MartinPacker opened 1 year ago
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.
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.
I've got plenty of unfinished unmerged ones. Just need to find some time to upgrade, polish and commit.
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.