Code and wiring diagram for a raspberry Pi sprinkler controller