I (ntoll) belong to a nascent hackerspace called NortHACKton. It’s an opportunity to learn new skills and to collaborate with a great bunch of people who create cool stuff. I’m going to describe just such a collaboration with Stephen Bridges, one of the organisers of the hackerspace.
Our aim was to combine a simple hardware project with Fluidinfo and do it in such a way that others could repeat, extend and enhance what we’d been up to. We decided to connect an Arduino to a sensor and put the resulting reading into Fluidinfo at regular intervals. In the end we built something to make a moisture reading of the soil in Stephen’s plant pot and update a value in Fluidinfo every 10 minutes.
The Arduino has an Ethernet shield so the device can communicate autonomously with Fluidinfo via the HTTP API. The support circuitry is adapted from Botanicalls.com (Creative Commons) and Stephen created the sensor from a pen lid, sticky tape and a couple of wires. 🙂
The source code can be found on GitHub and contains two parts:
- A generic and reusable layer that handles basic interaction with Fluidinfo
- The application logic that takes the reading and controls the Arduino.
From Fluidinfo’s point of view, there is an object that represents Stephen’s peace lily (its about tag value is “Stephen’s Peace Lily (houseplant)”) and the tag widget/ffm/reading attached to this object is updated with the appropriate value.
Interestingly, I’ve also added some tags to the object representing the peace lily which hold html, css and javascript values. This is a classic case of putting information in context since the peace lily’s web page is a tag-value attached to its object in Fluidinfo. So it’s possible to view the peace lily’s current status with your browser.
The whole thing was hacked together in an afternoon over a drink in a pub in Northampton. Unfortunately for Stephen my mobile phone takes video so I press-ganged him into the following explanation:
You can find Stephen’s write-up on the NortHACKton wiki. If you’re interested in doing something similar with Fluidinfo please don’t hesitate to drop in on our IRC channel (#fluidinfo on Freenode – connect via the web) and ask questions. Alternatively, drop by either the fluidinfo-users or fluidinfo-discuss mailing lists. We’d be more than happy to help.
[…] This post was mentioned on Twitter by Terry Jones, Kat Meyer, Volker Bombien, Nicholas Tollervey, FluidDB and others. FluidDB said: More #FluidDB blogging goodness from @ntoll: Watering a Peace Lily with FluidDB http://bit.ly/h8DoMr […]
Pingback by Tweets that mention FluidDB » Blog Archive » Watering a Peace Lily with FluidDB -- Topsy.com — November 23, 2010 @ 10:30 am
Thanks for this helpful post. Also, providing this code is a good help for everyone.
Best Website Designer l Best Website Design
Comment by Sarah Jones — December 20, 2010 @ 6:39 am