I'm trying to cycle through several applications/commands based on a GPIO input (buttons I have)
The kicker is that each application may use GPIO inputs as well.
So if I use GPIO 25 for example, each time I press it, it goes on to the next one:
1st app: Play a video
2nd app: display a flying bird (GPIO 24 flaps right wing, 23 flaps left wing)
3rd app: shows weather app (python script) (GPIO 24 changes the city)
4th app: shows system info (node.js script) (GPIO 24 shows different things)
5th app: does a slideshow (GPIO 24 goes next, GPIO 23 goes previous)
Once I get to the 5th app, cycles back to the 1st app, based on GPIO 25.
Now, I get each of these working individually. but can't figure out how to cycle through them.
I was trying to accomplish this via python but once I get into an subprocess app, it stops listening to GPIO 25.