Author: Matt

There are number of different Raspberry Pi board revisions that have been dispatched since the launch of the Raspberry Pi in 2012. These different hardware versions are very similar but offer improvements to the design that the Foundation felt would benefit the user community and help the Pi fulfill it’s stated objectives. The main Pi model has always stuck close to the original price of $35.

Read More

There have now been a number of different PCB revisions which have made small changes to the design of the Raspberry Pi PCB. In the latest revision some of these changes may affect the operation of Python code developed for earlier versions. In order to make you script react to these changes you may need to identify the board revision so your script can take appropriate action. The following Python function “getrevision()” can be used to return a string containing the hardware revision number. This is a four character string such as “0002”.

Read More

Every Raspberry Pi has a unique serial number. It is sometimes useful to extract this number to identify the hardware that your Python scripts are running on. The following function “getserial()” can be used to return a string containing the unique serial number. In reality this is the serial number of the Broadcom CPU but given you are unlikely to remove the CPU from the PCB it was supplied on this can be considered the serial of the whole device.

Read More

Each variant of the Raspberry Pi has a different Pi Revision Number. There have now been a number of revisions to the Raspberry Pi PCB so the device you have in front of you could be one of a number of variants. The changes include mounting holes, modifications to the power supply circuitry, different GPIO headers and varying numbers of USB ports. The Pi 2 and Pi 3 introduced new CPUs and additional memory. Finding your Pi Revision Number is a useful technique to identify what model of Pi you have and, in some cases, where it was manufactured.

Read More

For one of my Pi projects I wanted the ability to send SMS text messages from a Python script. These messages would be sent to my mobile phone and alert me about specific events recorded by my Pi. There was no possibility of connecting the Pi to a mobile phone so I decided to send the SMS via the internet. In previous years there were services that allowed you to send free text messages via the Internet. In general these services were either illegal or relied on loopholes in mobile phone networks that have since been fixed. So the only reliable…

Read More

Unlike some other devices the Raspberry Pi does not have any analogue inputs. All 17 of its GPIO pins are digital. They can output high and low levels or read high and low levels. This is great for sensors that provide a digital input to the Pi but not so great if you want to use analogue sensors. For sensors that act as a variable resistor such as LDRs (Light Dependent Resistors) or thermistors (temperature sensors) there is a simple solution. It allows you to measure a number of levels using a single GPIO pin. In the case of a light sensor …

Read More

This article is based on my previous article 16×2 LCD Module Control Using Python and 16×2 LCD Module Control With Backlight Switch. 20×4 LCD modules are relatively easy and cheap to obtain. They have the same 16 pin interface as the 16×2 modules but still only require 6 GPIO pins on your Pi (an extra pin is required for the backlight switch). These modules are compatible with the Hitachi HD44780 LCD controller. There are plenty available on eBay with a variety of backlight colours to choose from.

Read More

Following on from my article about controlling a 16×2 LCD module with Python and a Raspberry Pi I decided to make a few enhancements. These included : Adding a 10Kohm variable resistor to adjust the contrast Adding a 5Kohm variable resistor to adjust the backlight brightness Adding a transistor to allow the backlight to be switched on and off Allowing left, centred and right justified text

Read More

Once you’ve played with LEDs, switches and stepper motors the next natural step is 16×2 alphanumeric LCD modules. These modules are cheap (less than $10) and easy to interface to the Raspberry Pi. They have 16 connections but you only need to use 6 GPIO pins on your Pi. Most of the 16×2 modules available are compatible with the Hitachi HD44780 LCD controller. This allows you to buy almost any device and be sure it is going to work in much the same way as any other. There are loads to choose from on eBay with different coloured backlights. The…

Read More

The RPi.GPIO Python library allows you to easily configure and read-write the input/output pins on the Pi’s GPIO header within a Python script. This article is an updated version to take into account changes in the RPi.GPIO library and the release of the Raspbian SD card image.

Read More

Having played with LEDs, switches and buzzers I felt the natural next step was playing with a stepper motor or two. Unlike conventional electric motors, stepper motors allow you to rotate the axis in precise increments. This makes them useful in all sorts of Raspberry Pi projects. Basic Stepper Motor There is a huge selection of stepper motors to buy but I decided to experiment with a 28BJY-48 with ULN2003 control board. The reasons I chose this device where : It is cheapRuns on 5VEasy to interface to the Pi’s GPIO headerSmall but relatively powerfulWidely available from both overseas and…

Read More

The most obvious application for a Raspberry Pi is re-creating the sliding red lights found on “KITT” from Knight Rider or the Cylons in Battestar Galactica. This can all be done with pure electronics but that doesn’t involve any programming and therefore isn’t as cool. So here is a brief description of my “running lights” project. It may be overkill to throw an entire computer at such a task but it served a number of purposes : good introduction to Python GPIO programming good introduction to Raspberry Pi GPIO interfacing good practice at soldering, wiring, testing and constructing an electronic…

Read More

It can sometimes be useful to obtain the MAC address of your Raspberry Pi’s network interfaces. The “Media Access Control” address is a unique identifier given to all networked devices. The address is different for all Pi’s and can be used to identify your device. Think of it as a digital fingerprint. There is a separate MAC address for Ethernet and WiFi interfaces. There are a number of ways to identify them using the command line or using Python code. Below are some quick examples you can use to find the MAC address.

Read More

I decided to attach some speakers to my Raspberry Pi. I didn’t want to spend much so I picked up a pair of stereo speakers from my local Poundworld. They cost £1 exactly. They aren’t exactly the sort of speakers you would hook up to your HiFi system but for experimenting you can’t beat the value. They have a 3.5mm jack which plugs into the Pi’s analog audio connector.

Read More

The Raspberry Pi is powered by an ARM SOC (System On a Chip) running at 700MHz. It is possible to increase this speed in order to squeeze some extra processing power out of the CPU. It is also possible to increase the speed of the Graphics Processing Unit (GPU) and the onboard RAM. The default speeds are : CPU – 700MHz RAM – 400MHz GPU – 250MHz

Read More

The circuit below shows to turn an LED on and off using a Raspberry Pi GPIO pin configured as an output. It uses the output pin to turn on a transistor which allows the LED to draw current from the 5V supply. The following header pins are required : Header Pin 2 : 5V Header Pin 6 : Ground Header Pin 11 : GPIO The Header Pins are defined in my Raspberry Pi Header Pin page. You can use whatever GPIO pin you like but I used pin 11 for my tests.

Read More

The Raspberry header is the key to its ability to interface with the real world. The Pi either uses a 40-pin or 26-pin depending on the model and it is important to understand how those pins are arranged and labelled. The GPIO header provides the following power and interface options : 3.3V (on 2 pins)5V (on 2 pins)Ground (on 8 pins)General purpose input and outputPWM (pulse width modulation)I2CI2SSPISerial These allow a massive range of sensors, motors, LEDs and accessories to be connected to the Pi.

Read More

In order to make my Raspberry a bit easier to handle and give it a bit of weight I decided to make a temporary case. It needed to be complete in five minutes, cost nothing and allow for a certain amount of redesign. Which left only one solution : LEGO. Here are some photos of my Raspberry Pi LEGO case. Due to the ever present threat of global terrorism a security patrol formed a ring of steel during construction.

Read More

If you are running the Raspbian operating system you may want to have your Pi auto-login. This may be particularly useful if you are using your Pi to perform a specific operation where you don’t want to login using a keyboard when it is turned on. You may also want the LXDE desktop to auto run on bootup. The steps below will explain how this can be done :

Read More

Here are some initial photos of my two Raspberry Pi Model B’s. One from RS and the other from Farnell Element 14. They are named “Tango” & “Cash” and have matching SanDisk Ultra 8GB Class 6 SD cards. At the moment they prefer Debian Squeeze but who knows what the future may hold? At some point I will create some cases either from cardboard or LEGO if I can sneak some out of my son’s collection.

Read More

The default images provided for the Raspberry Pi are usually 2GB and this results in wasted space on larger SD cards. When the image is written to your card three partitions are created. A boot partition, a Linux system partition and a swap file partition. They are sized to fit on a 2GB SD card and the additional space on larger cards is unallocated and unusable. This procedure explains how you can allocate that spare space and use the full capacity of your SD card. This involves moving the swap partition to the end of the card and then increasing…

Read More

This tutorial explains how to enable SSH on the Raspberry Pi. There are a number of methods you can use. Secure Shell or SSH is a network protocol that allows you to run commands on a remote device. In the case of the Raspberry Pi can you execute commands over your network from another device such as a PC or laptop. This allows you to control the Pi without attaching a keyboard, mouse or even a monitor. If configured correctly you can use SSH to communicate with your Pi over the internet.

Read More