However you feel about GMOs, organics, etc - it is a pretty universal desire to have fresh food that doesn't have anything harmful contained within. We had a strip of gravel/dirt that wasn't being used for anything except collecting weeds when it rained.
  • We wanted to run our garden with no grid power so that it could manage itself indefinitely (even when the power goes out).
  • We wanted to be able to water the garden either using a timer or by pushing a button.
  • We wanted a raised bed since this garden was going to be in a desert with terrible 'soil'.


We put in some pipe for two trees on either side of what was going to be the raised bed. You can see the pipe sticking up in the middle. This is the primary means of watering the raised bed.



Those pipes are fed from a single inlet pipe with the 12v valves controlling the flow to each. (The third, middle, pipe just goes to an unrelated faucet)


Once the pipe was in, we covered everything up and took a little break to figure out how to lay out the cinder-blocks for the bed.


We tried a few different layouts. We wanted to maximize the available bed but also wanted to make it easy to plant and pick food from.


We ended up removing the back row of blocks and staggered the width so that we were able to reach all parts without having to step up.


Once we had the blocks in and level, we had some soil delivered. We made sure to get enough to fill the pockets of the blocks. They require more than you would initially think but also grow a lot more than you would imagine!



  • Voltage regulator stepping down the 12v power from solar charged battery to 5V for the Pi. Battery is in the shed and panels are on the roof.
  • RPi camera. Used for capturing time lapses and making sure everything is green when we are away.
  • Raspberry Pi A,B,B+,2 and 3 should all work just fine here.
  • Thermometer that uses the OneWire bus. It is hanging outside of the enclosure in this picture to get a more accurate temp.
  • Motion detection that uses a regular GPIO pin. As a side note: some plastic (such as this particular box) is opaque to IR. That is why the sensor is hanging out.
  • Simple board that wires two GPIO pins to the relays, first going through a darlinton array which both amplifies the weak GPIO signal and also provides some induction backlash for free (super important if you value your Pis!).
We installed the NodeCode Agent on the Raspberry Pi remotely from NodeCode Studio. Once it popped up under the Hub, we renamed it to Garden and started working on a View for the Garden.
We created a simple view that let's us control the two valves that we installed earlier as well as get a temp reading and live water flow.


We need the RPi GPIO Service so that we can hook up our View's switches to the pins on the Raspberry Pi. We also need to download the Transforms Service so that we can convert some data (it's always handy to have).
Note: Services are platform specific. You can have the same service running on Raspberry Pis (Arm/Linux), Linux (x86), Windows (x86). Make sure to grab the correct version that targets the Pi.
We add the services to the Hub (if you haven't already added them) by going to the Service Packs item under the Hub and clicking the Add button. You can then browse for the Service Pack that you've downloaded.


We've created a simple NC Program called Garden. We can see Garden under the Devices item. Drag and Drop each of the Services under 'Available Services' onto the Garden Device to install them on that device.


Once they are installed, they will show up with grey icons. Grey means that they are stopped. Right click on each of them and click 'Start'. It takes a while to start the initial start since it has to configure itself. When they are ready, they will turn blue and have down arrows.


We need to drag on two Digital Pin Writers. We will then click each, renamed them and set the Pin number for each that were wired to the Relay (through the Darlington Array) in the property...
Read more »