I'd like to share with you some ideas how to control our RPIs. My rather simple code provides following features:
- Rotary encoder class working with interrupts to be more independent from pooling timing (especially important in pygame systems)
- Local pygame menu system controlled by rotary encoder / switch and small (and cheap ) LCD display. Menu can be defined by finite machine states and transitions. This allows easy logic modification without too much coding.
- Web enabled user interface with bidirectional (html5 server side events) feature. RPI status changes are sent to the clients without necessity to reload the web page. As I cannot write android / iOS apps - this is the easiest way to get remote user interface on any computer or mobile device.
All the above features can be easily reused in your own projects. Initially I developed them to control tvheadend and oscam server, which run on RPI and stream a dvb-s2 video to my clients. I call this is a "headless" dvb-s2 streaming tuner.
If you are interested in, please check my github repositories - the starting point is here:
=> DIY for the hardware and already exiting software
=> local FSM pygame menu with rotary and lcd
=> remote web user interface
For a quick inside you can look at youtube:
=> for the complete system overview
=> for an example of the web user interface
All love screenshots so some pictures:
I'm happy to answer any related questions, you may have. I have to admit, that the code is "quick and dirty" however if you have any remarks or improvement ideas, let me know.