Figure 1 – BMP085
Another fun little i2c device acquired cheaply via eBay. It reads barometric pressure and temperature. There’s some relatively simple maths to convert the outputs to something readable.
Once again, ADAFruit provide a fantastic guide and library for using the device in their Using the BMP085 with Raspberry Pi. As in previous posts, I could have just used the ADAFruit library out of the box. Whilst I do not feel the need to re-invent the wheel and re-code from scratch, I do like to have an understanding how it works. Continue reading
A quick little post for my future reference really. Wanted to get an i2C Analogue to Digital Converter (ADC) working on a Raspberry Pi. No real application as yet, but sure to be one in the future.
Most of the information to make this work was taken from posts by Grumpy Mike on the Raspberry Pi forums. Got a couple of PCF8591s nice & cheep from eBay. Continue reading
Figure 1 - Working Breadboard Prototype
In Pelican Crossing – Part 1 software threads were used to provide timing to both the lights and the buzzer at the same time. In Part 2, the I2C MCP23017 is used again but instead of using software to time the operations, the intermittent buzzer is implemented in hardware using a 555 timer. This simplifies the code but makes the hardware more complex. I learned something from both versions.
The python code in Clocks – Part 1: HD44780 16X2 LCD suffers from (at least) one major drawback; if you close the terminal session, the clock dies. This post improves on the by running the clock as a daemon process. That is, one that doesn’t die when the terminal session is closed.
Or by Wikipedia’s definition:
In multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user.
Figure 1- Working Prototype
This is my first attempt at driving a LCD display based on the Hitachi HD44780 LCD controller. The code and circuit wiring is taken from this post on RaspberryPi Spy. I also took some ideas from a similar post on AdaFruit’s Blog.
Figure 1 - Prototype
This experiment is the first version of a Pelican Crossing. This version uses discrete components. I won’t be making a veroboard version of this, just prototyping on breadboard. An I2C version may follow.
My Raspberry Pi’s are connected in a headless fashion, over the network with no dedicated screen & keyboard.
I find it more convenient to do my Python programming on my Windows 7 PC using Eclipse with the code base on Network Attached Storage. The same code base is mounted on the Raspberry Pi. It is then possible to tinker with scripts that don’t require the RPi’s hardware within Eclipse or log into the Pi to run the scripts that use the GPIO or to deploy scripts when they are finished.
For me, it’s the best of both worlds. Eclipse is a fantastic feature rich open source Integrated Development Environment.
There are plenty of great installation guides for Python and Eclipse so I won’t re-invent the wheel here just list the compontents and guides to installing them.
Python Programming Language – Official Website
PyDev – Python Plugin for Eclipse
Figure 1 - Prototype i2c Traffic Lights
Third version of the traffic lights uses a MCP23017 i2c Bus Expander. This project is the gateway to great things as there are so many fantastic i2c devices out there to play with.
Figure 1 shows the prototype on breadboard.
This post details my first and simplest attempt at driving some LEDs with a Pi. 3 LEDs, 3 resistors and some wires.
The circuit diagram, breadboard version and veroboard version are shown. Python source code for the traffic light sequence is shown.
Next will be versions of traffic lights using transistors and then an I2C bus expander.
There’s a couple of good sources of explanations for the pin-outs of the Raspberry Pi’s GPIO connector.
My favorite being the one on LWK’s Arduino Projects blog. Don’t let the title fool you, the author has seen the light and is tinkering with Pi’s too.
Recently the Raspberry Pi foundation announced Rev 2.0 of the board. I only have Rev 1.0 boards, so don’t need to worry about the pin-out changes just yet. Either way, it is simple enough to make your circuits compatible with both.