I put in an order to Little Bird Electronics at Christmas to take advantage of a 10% discount coupon, so I added a few bits and pieces that might come in handy. First off was a DHT22 temperature and humidity sensor, which is readily available with lots of examples around. First I tested it with some sample code, and then modified my existing ‘weather’ station code. So now I have two different measures of light levels, two temperature readings and humidity. There is a slight difference of about half a degree between the two temperature sensors, so I wonder which one is more accurate? The Xively feed immediately picked up the two new data streams, and as a bonus my iPhone app also recognised them.
I also bought an MPL3115A2 barometer/altitude sensor which looks interesting, but it is my first experience of the I2C bus and it appears that to run long distances to an outside sensor it needs a bus driver of some sort, so this one is going to take more effort. The code looks rather daunting too.
Xively has a heap of APIs so you can access your feed data in other ways rather than just loading up the web page. I was able to use their sample code to put together a simple iOS app that lets me check the temperature and light levels in my study at any time, from anywhere. It’s nothing fancy but a good proof of concept.
So I got hold of a Freetronics EtherTen early this year and started getting familiar with it. After getting a multi-colour LED to change colour I hooked up a tempreature sensor and got it reporting temperature as a simple web server. It’s still sitting on my study desk at the moment. To see this remotely on the web I had to figure out how to do port forwarding on my router.
About this time I discovered Cosm, and hacked up a feed so that I could push my data to their site, and thus make the data visible without having to open a port on my network. Cosm turned into Xively, so I rewrote the sketch to incorporate the API changes. You can check the feed here.
A bit later I dug out a couple of LDRs and hooked them up so I can measure light level too. There are two because they are different types and I wanted to check their sensitivity. The temperature sensor is hanging off the edge of the desk at the moment.
Here’s a shot of the Xively feed. This is the last 7 days and you can see the daily cycles. Some days the curtains may be closed, and some evenings a light may be on. The light levels are inverted, so when it is bright the resistance and thus the graph drops.