08/19/2014 at 14:06 •
With the sensor ready I I set myself up with an account with Xively and began to hack away at the Xively demo from the Ethernet library. I initially used only one sensor from the DHT11 and sent the data onto the web and started viewing the data. Then adding the second sensor was a simple duplication job.
The next step was to setup the raspberry pi as an Apache web server. Using another Xively demo as a base a simple webpage was created to display this data.
Add a picture and the concept was proven:
There is a number of choices made along the way that need to be looked at again.
The message structure used by the sensor only uses two bytes of data. This was done just to avoid the collision with the remote controlled sockets. I need to analyse this to decide on a protocol that is going to avoid this problem and have the ability to be flexible.
The usage of CGi scripts and UDP messages might not be the best way to do it, but this is my first venture into web based programming, so I don't know any better and have just gone with the one I can get to work.
Ideally I think that having the sensor data on the Pi rather than Xively would mean that the server could be in constant communication over the LAN and give me more control of the data
08/19/2014 at 13:40 •
To have any meaningful setup I was going to need a sensor. At the recent UK MakerFaire (In Newcastle) I picked up a DHT11 temperature and humidity sensor. I decided to use this and an msp430 to monitor our pet Snails. Again I used a bread board to prototype the sensor:
Since this was going to be on the Snailarium, I decided to box it up. a reused battery box and with some tricky positioning fit it all in.
08/19/2014 at 13:29 •
With the circuit working I could move it to an Arduino shield. I don't think this needs more explanation, Because of the amount of modules used, this is really just a wiring job. I have left enough space on the shield to add a 2.4GHz transceiver at a later date
08/19/2014 at 13:24 •
The first task was to prototype the hardware. For this I used the bread board setup shown below. It's a bit of a mess, but let me get each section working on it's own. I started by using the examples for the Ethernet shield to check the internet connection, then used the RCSwitch library examples to send and receive with the 433 MHz modules. While I was using the the receive example I also captured the codes from the remote control for the sockets. This will let me reuse the codes to control the sockets and detect when the remote has been used instead of the web.
Once the circuit was proven I could finalize it, giving me the following