pimoroni / pirate-audio

Examples and documentation for the Pirate Audio range of Raspberry Pi add-ons
MIT License
248 stars 50 forks source link

Detect which pinout for Y #47

Closed duracell80 closed 1 year ago

duracell80 commented 3 years ago

Anyone know how I could detect which BCM number to check for on Y? Is it 20 vs 24? I'm trying to bulletproof my script for the buttons before publishing.

Gadgetoid commented 3 years ago

It's not possible to auto-detect without user input, but you could use a minimal Python script to set up each pin, prompt the user to press the "Y" button and the pin that goes low would be the one you need.