Hello everyone,
first time poster but I hope this is the right place!
Following situation: I wrote a small program in Rust to interact with an arcade button. The arcade button's LED and switch are connected to a Raspberry Pi 3's GPIO pins (running standard Raspberry Pi OS). Basically, the LED is lit up to signal "I'm ready" and when the button is pressed, the LED is turned off and an audio file (wav) is played. Once file is done, the LED turns on again. Repeat.
Here is the thing: when I run the compiled Rust binary directly everything works fine. But when I call the binary from a shell script only the audio playback on button press logic works, the LED never turns on.
And I don't understand why that is? I should have the same permissions when running the binary directly vs running it in a script, no? And why does reading the button press work (input) when the LED (output) doesn't? What am I missing/ not understanding?
Thanks in advance!
first time poster but I hope this is the right place!
Following situation: I wrote a small program in Rust to interact with an arcade button. The arcade button's LED and switch are connected to a Raspberry Pi 3's GPIO pins (running standard Raspberry Pi OS). Basically, the LED is lit up to signal "I'm ready" and when the button is pressed, the LED is turned off and an audio file (wav) is played. Once file is done, the LED turns on again. Repeat.
Here is the thing: when I run the compiled Rust binary directly everything works fine. But when I call the binary from a shell script only the audio playback on button press logic works, the LED never turns on.
And I don't understand why that is? I should have the same permissions when running the binary directly vs running it in a script, no? And why does reading the button press work (input) when the LED (output) doesn't? What am I missing/ not understanding?
Thanks in advance!
Statistics: Posted by arcticmonkeyz — Wed Jan 29, 2025 6:33 pm — Replies 0 — Views 16