I’m trying to run an LED matrix display (with a Max7219 controller) from a raspberry pi pico using rust. There is a max7219-crate that I used. But i am unsure about how to prepare the pins I want to use. Can I Use any of the pins? Do I have to set them to push-pull-output?
Yes, this community is stil alive.
I don’t really have an exact answer to your question, as I don’t write Rust, and I’ve never used a Raspberry Pi for electronics, but I have some educated input:
Presumably, the crate just exposes pre-defined config objects that you call in your code.
From what I recall, no, you can’t use any of the pins on the Raspberry Pi as generic IO (all this information that you are looking for is in the datasheets of the devices that you are using) – some pins are dedicated for power, etc.
Generally speaking, yes, if you want to use a generic I/O as an output, then you must configure it as such.