So, I've had this Galileo for a while now as well as some other bits like the LCD-keypad below and looking for something interesting to do with it.
A while back the domestic management had installed a watering system in the garden and it needed a bit of TLC so we got stuck in and repaired all the leaks and put new sprayers in etc. and it was working beautifully.
We also had an automatic timer which was a little old but still operational but with no connectivity to anything.
Why not build a control system with the Galileo I thought! How hard can it be? Well it is not all that difficult as it turns out.
- 1 x Galileo + wireless card
- 1 x set shield breakout connectors to make it easier to connect the relay board
- 5V power supply for the Galileo and a 24VAC power supply for the solenoid (strangely enough I had 2 of these in my "box of miscellaneous power supplies" which any self respecting computer person has)
I decided to use normal Arduino to program the Galileo so first part was to get the LCD keypad working. (this is not a required part as the unit is controllable over the network but it is fun to press the buttons as well as seeing the countdown on the display). For this I knew I needed to update the "LiquidCrystal" library (not sure if you still need to do this). Galileo LiquidCrystal Library Fixes
Then simply stole the code from a couple of different examples Arduino LCD KeyPad Shield (SKU: DFR0009) - Robot Wiki and the WiFi example SimpleWebServerWiFi from Arduino and then a simple matter of programming.
I did look at the code from the Open Sprinkler project but it looked overly complex for what I needed.
So we can turn the individual relays on for a period of time through the webserver or manually using the buttons.
The code is attached, probably a few bugs in there still and not very elegant (especially the handling of the URLs) but it works.
The domestic management can now turn the sprinklers on from her tablet.