More tinkering fun
Back to the real world. I have re-immersed myself in the learning required to build a little automated, web connected weather station.
I have been learning a lot about working with the Arduino (proto boards built around the Atmel ATMega 328 microcontroller), and have added some goodies around connecting sensors, working first with a 1 wire humidity and temperature sensor, and soon to come some more sophisticated modules that will be more flexible.
However, while it is possible to do almost all of the work I want with the arduino based system, ultimately, I am going to want to drive a little display for review here in the house, and to log it to one of my internet servers, so I can be a geek and see the readings at home wherever I happen to be.
This weekend, I dove into the Raspberry Pi, as that is a suitable central control, data logging station, and a vehicle to push the readings to the internet. However, it was a wee bit more complicated to get working than the Arduino.
Where the Arduino is pretty much built to be connected to various hardware goodies, with proper digital and analog IO’s and enough power handling to do things, the Raspberry Pi is much more of a general purpose computer, with some GPIO grafted on. Cool, but there are some hoops to jump through.
My first project was relatively trivial, a 4 character, 7 segment LED display (as you would use for a clock) with a little i2c driver on it, used with a simple clock program in Python.
I bought the display and its driver board from Adafruit and at first followed the instructions on getting it all setup from Simon Monk’s book, Programming Raspberry Pi: Getting Started with Python, in particularly chapter 10.
Alas, I have the older version of the book, and the libraries just didn’t work. Fortunately, the folks at Adafruit have metric butt-loads of tutorials, and after walking through the setup of Raspberry Pi for i2c (hint: Using the advanced setup option on the raspi-config program wasn’t enough. I ended up manually modifying several configuration files), I got it all working.
In the meantime, I learnt how to clone a git repository, and have increased my at one time decent linux knowledge (that has atrophied). Cool.
I now have a simple LED clock running on a prototype board.
Next step: Writing a logging program for the SHT temperature and humidity sensor, followed by adding it to a google docs file, so it can be accessed on the web. Cool stuff indeed.
Longer term, my goal is to build small stand alone Arduino controlled acquisition stations, one inside the house, one for the outside, and to channel the data to a raspberry pi control station, with a display, and web based logging. Still a ways to go, but incrementally, making progress.
Last note: I picked up a B version of the Raspberry Pi. It adds 2 more USB ports, 10 GPIO pins, and doubles the memory with a faster clock speed. It dropped the composite video out (srsly, why have that at all in the original A rev?!?!?). It is noticeably faster driving my 24″ display via HDMI.