As soon as I ordered some Pi NoIR camera modules I also ordered some bits and pieces for testing. This included some standard IR LEDs and a couple of cheap IR CCTV illuminators.
These would allow me to test with the camera module and work out what sort of IR lighting I needed for different applications. Ideally I was looking for suitable lighting for an outdoor security camera and I wanted to workout if it would be easier to use ready made lights or make my own.
The Raspberry Pi camera has been available for a while now and it has resulted in plenty of camera based projects.
Like many camera modules it is fitted with an infrared (IR) filter which is there to improve overall image quality. Humans can’t see infrared so it most cases it is better to filter it out and tune the camera to visible light. Most webcams use a similar technique.
However this reduces the usefulness of the camera module in some applications. Many webcams can have the filter removed with a bit of hacking but this wasn’t very easy with the Pi camera … until now.
The Raspberry Pi has no built in analogue inputs which means it is a bit of a pain to use many of the available sensors. I wanted to update my garage security system with the ability to use more sensors so I decided to investigate an easy and cheap way to do it. The MCP3008 was the answer.
The MCP3008 is a 10bit 8-channel Analogue-to-digital converter (ADC). It is cheap, easy to connect and doesn’t require any additional components. It uses the SPI bus protocol which is supported by the Pi’s GPIO header.
This article explains how to use an MCP3008 device to provide 8 analogue inputs which you can use with a range of sensors. In the example circuit below I use my MCP3008 to read a temperature and light sensor.
“Adventures in Raspberry Pi” is a book by Carrie Anne Philbin, a valued member of the Raspberry Pi community.
Miss Philbin is a secondary school teacher of computing so knows a thing or two about the challenges of teaching kids computer programming. Her book aims to teach computer programming and some system administration skills to kids using the Pi. No previous knowledge is assumed so is suitable for everyone.
The book is written with 11-15 year olds in mind but I suspect it will be useful for a younger audience with appropriate support.
Posted in Books, Programming
It’s that time of year when mad inventors start creating Halloween themed electronics projects. I’ve never managed to be organised to do a seasonal project but this year I decided to give it a try.
So this year I decided to take what I’ve learnt about the Pi-Lite and create a simple Halloween project I can stick in the window along side our more traditional carved pumpkins.
In my previous post about the Pi-Lite I explained how to set it up and how you could display scrolling text in Python. In this post I will explain how to create custom 14×9 pictures and then send them to the Pi-Lite. This is the same technique used to create the Pac Man image to the right.
The Pi-Lite has a frame buffer feature which allows you to send it data which determines the state of each LED. You can set each LED to be on or off and once all your data has been received the Pi-Lite sets the LEDs as instructed.
This command is a string of 126 ones and zeros. The string defines the top left LED and then works down the first column. It then defines the second and so on until all 126 LEDs have been set to either a 1 or 0.
While putting together some future articles I wanted to take some screen shots within LXDE, the Pi’s default graphical interface.
I considered taking them on my PC using a remote desktop connection to the Pi but I thought it might be easier to just take them directly on the Pi as I used it.
To do this I decided to use Scrot which is a command line screen capturing utility.
The installation can be completed on Raspbian using a standard apt-get call :
sudo apt-get install scrot
Until recently I had never played Minecraft but it’s popularity meant it was something I felt I had to try. I installed the free pocket edition on my Nexus 7 to try it out and as a result decided to give it a go on the Pi.
Using the Pi to run Minecraft opens up the possibility to interact with the 3D world using Python. This is something that particularly interested me. You can build structures using the normal interface but on the Pi you’ve got the chance to control that world using scripts to create and edit blocks.
The Pi Edition is similar to earlier versions of the Pocket Edition and only offers “Creative” mode. Therefore it’s not as advanced or fancy as the versions you may be used to playing on other platforms.
So lets get started!
On the 21st September I made my way from Bristol to Cambridge for a Raspberry Jam. It was quite a long journey but was worth it.
I didn’t really plan on buying anything while I was there as I didn’t need anything.
However, that was before I saw the tempting range of Pi items available from the vendors. So here is a quick summary of the various bits and pieces I walked away with.
If you’ve followed the previous Pi-Lite setup article you should have a working Pi-Lite. The example Python scripts are great but I wanted to show a simple example of my own demonstrating the basics of sending scrolling text to the Pi-Lite.
Scrolling text is something that the on-board microcontroller handles for you so it really doesn’t involve much effort to do using a short Python script.
The following script scrolls two messages to demonstrate the technique.
# Define message complete with
# carriage return at the end
message1 = "Hello World!\r"
message2 = "Pi-Lite messages are easy!\r"
# Configure Pi serial port
s = serial.Serial()
s.baudrate = 9600
s.timeout = 0
s.port = "/dev/ttyAMA0"
# Open serial port
except serial.SerialException, e:
# There was an error
sys.stderr.write("could not open port %r: %s\n" % (port, e))
print "Serial port ready"
# Clear display
# Send message 1 to the Pi-Lite
# Short delay to allow the
# 12 character message to finish
# Send message 2 to the Pi-Lite
# Short delay to allow the
# 26 character message to finish
print "Good bye"