Merging in (minor) changes from the latest available sprinklers_pi

Originally I was using earlier version of the sprinklers_pi code. To
align the code with the latest state of the sprinklers_pi I'm merging
changes from Richard's github repository.