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?

  • Kalcifer@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    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:

    There is a max7219-crate that used. But i am unsure about how to prepare the pins want to use.

    Presumably, the crate just exposes pre-defined config objects that you call in your code.

    Can Use any of the pins?

    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.

    Do have to set them to push-pull-output?

    Generally speaking, yes, if you want to use a generic I/O as an output, then you must configure it as such.