perhaps this app would be more generally useful if the GPIO was split out to a separate module - a proper DataSource etc.