I'm working on a Raspberry Pi Datalogging System (Shameless plug here: http://medicforlife.blogspot.com/
The goal is to create a very flexible device that is capable of logging and easily reporting data. I'm starting out with a simple BMP085 sensor to record temperature and pressure. Eventually I would like to be able to include additional temperature and pressure sensors, motion sensors, smoke/CO/gas sensors, even light and sound sensors. The goal isn't really to create the sensor device. Instead, I want to create a device that detect local events, log them, report them via a webpage, and possibly react to them.
I know would like to incorporate analog and digital sensors. I've already incorporated the I2C portion (LadyAda really did most of that work), and I'm looking for more sensors to include using I2C, as I think that has tremendous potential.
I'm using Python. I fell in love with it when I was in college (Dan Fleck, you were a great teacher). Back then, I was learning 2.7. Now I'm trying to update my skills by using 3.2. I may be having some trouble with that (more on that later).
First, I've written a couple of code snippets to take advantage of LadyAda's Adafruit_I2C and Adafruit_I2c code. I wrote some code that polls the sensor after a preset period (I'm using once per minute), and logs the result (temperature and pressure. I'm not interested in the altitude) using the Python Logging module. This code also updates a primitive webpage that is hosted on the Pi, showing the temperature and pressure (I'm hosting the page using Apache). Today a wrote some code that jumps through those log files and pulls the temperature data. It takes the temperature data and generates a list. My goal with this is to allow the user to access the webpage, click on the current data conditions and be presented with a graph of the last hour. Clicking on that graph would generate a graph of the last 6 hours. Clicking on that graph would generate a graph of the last 12 hours. Then 24 hours, then a week, a month and out to a year.
I was reading a book, Beginning Python Visualization (Shai Vaingast, Apress Publishing), that made it look simple to generate chart files to view the data. It really looked like I would need less than half a dozen lines of code to generate the chart. I actually laughed out loud when I read the chapter because it looked so easy.
I should have known better.
I'm trying to get matplotlib to work with my Python3 installation, and I'm not having any luck. I can import the module using Python 2.7, but Python 3 refuses to see the module. I really am an amateur with these things (This is the most I've used Linux in my 30 years with computers), and I know I'm missing something simple. If anyone has any ideas, I'm more than happy to listen. Even more, I'm more than happy to try out ideas.