Using A Joystick On The Raspberry Pi Using An MCP3008

Raspberry Pi Spy -

While browsing eBay looking at electronics stuff I found a few interesting items to connect to the Pi. The first item was a small 2-axis analogue joystick. They are similar to the thumb-sticks you would find on a modern games console controller. These modules are cheap and easy to connect to a circuit so I decided to get one. The outputs are analogue so you need a mechanism for the Pi to read these voltages.

In this post I’ll show how you can you use this device with the Pi. Once working this could be used as an input device for all sorts of projects. Perhaps a Python game written using the Pygame module?

The device I bought was labelled “Keyes_SJoyes”. It consists of two potentiometers which give an analogue voltage based on the horizontal and vertical position of the thumb-stick. Pressing the stick activates a small switch. There are no fancy components on the board and because it is really just two variable resistors works fine with 3.3V despite the 5V PCB label.

In order to measure the X and Y voltages I decided to use an MCP3008 10 bit Analogue to Digital Converter. These devices are cheap, easy to setup and allow 8 analogue inputs to be read by the Pi using it’s SPI interface. In this tutorial we will only need three of its inputs.

See my previous MCP3008 post for details of how I used one to read light levels and temperature.

Breadboard Circuit

Here is my test circuit. The pin-out of my joystick is slightly different to the Sparkfun symbol I used in this diagram but the wire colour coding matches the photos.

Here is the wiring information for the joystick module :

Joystick Pi/MCP3008 Wire Colour -------------- ---------------------- ---------------- GND (Ground) Pi GPIO Pin 6 (Ground) Black 5V (3.3V) Pi GPIO Pin 1 (3.3V) White SW (Switch) MCP3008 Pin 1 (CH0) Purple VRx (X voltage) MCP3008 Pin 2 (CH1) Blue VRy (Y voltage) MCP3008 Pin 3 (CH2) Green

The MCP3008 is wired up just as it was in my previous post :

MCP3008           Pi                 Wire Colour -------------- ---------------- ----------- Pin 1 (CH0) - Purple Pin 2 (CH1) - Blue Pin 3 (CH2) - Green Pin 9 (DGND) Pin 6 (Ground) Black Pin 10 (CS) Pin 24 (GPIO8) Orange Pin 11 (DIN) Pin 19 (GPIO10) Yellow Pin 12 (DOUT) Pin 21 (GPIO9) Green Pin 13 (CLK) Pin 23 (GPIO11) Blue Pin 14 (AGND) Pin 6 (Ground) Black Pin 15 (VREF) Pin 1 (3.3V) Red Pin 16 (VDD) Pin 1 (3.3V) Red

In this case we are using three of the analogue inputs. You could read the Switch value using a normal GPIO pin but in this case I decided to use an analogue input for convenience.

The 10K resistor is used to pull the switch input High (3.3V). When the switch is pressed the input is connected to ground (0V). Without the resistor the input would be in an undefined state when the switch wasn’t being pressed and read random values. Give it a try.

Pi SPI Configuration

In order to use the MCP3008 we need to configure the SPI bus on the Pi first. Rather than repeat the instructions here open the Analogue Sensors On The Raspberry Pi Using An MCP3008 tutorial in a new browser window and complete the sections :

  • Enable Hardware SPI
  • Install Python SPI Wrapper
Python Test Script

Hopefully if you’ve wired it up correctly and got the SPI interface configured we are ready to run a Python script to read the joystick values.

The ADC is 10-bit so it can report a range of numbers from 0 to 1023 (2 to the power of 10). A reading of 0 means the input is 0V and a reading of 1023 means the input is 3.3V. In our circuit the switch will read 3.3V (1023) until it is pressed when it will read 0V (0). The X and Y joystick values will vary between 0 and 1023 as they are moved from one extreme to another. In the centre position we would expect a a value of 511.5. In reality this is going to vary between 509 and 514.

#!/usr/bin/python #-------------------------------------- # This script reads data from a # MCP3008 ADC device using the SPI bus. # # Analogue joystick version! # # Author : Matt Hawkins # Date : 17/04/2014 # # http://www.raspberrypi-spy.co.uk/ # #-------------------------------------- import spidev import time import os # Open SPI bus spi = spidev.SpiDev() spi.open(0,0) # Function to read SPI data from MCP3008 chip # Channel must be an integer 0-7 def ReadChannel(channel): adc = spi.xfer2([1,(8+channel)<<4,0]) data = ((adc[1]&3) << 8) + adc[2] return data # Define sensor channels # (channels 3 to 7 unused) swt_channel = 0 vrx_channel = 1 vry_channel = 2 # Define delay between readings (s) delay = 0.5 while True: # Read the joystick position data vrx_pos = ReadChannel(vrx_channel) vry_pos = ReadChannel(vry_channel) # Read switch state swt_val = ReadChannel(swt_channel) # Print out results print "--------------------------------------------" print("X : {} Y : {} Switch : {}".format(vrx_pos,vry_pos,swt_val)) # Wait before repeating loop time.sleep(delay)

You can download this script directly to your Pi using :

wget https://bitbucket.org/MattHawkinsUK/rpispy-misc/raw/master/mcp3008/mcp3008_joystick.py

This can then be run using :

sudo python mcp3008_joystick.py

If everything has worked correctly you should see an output that looks something like :

The switch reading varies but is always >1010 when not pressed and <10 when pressed.

As you move the thumb-stick you should see the X and Y values changing. You can reduce the value of the “delay” variable to increase the update rate.

Now that you can read values from a joystick you just need to think of a project to use it in! You could add an additional module and use another three channels on the MCP3008.

Here are some photos of the test circuit and the thumb-stick joystick module :

You may notice my breadboard in the photos has a few extra wires on it (long red wire, long blue wire and bent black wire). These were left over from previous MCP3008 tutorials and can be ignored.

Here are some other blog posts I found using an analogue 2-axis joystick with a Raspberry Pi :



Preview the upcoming Maynard desktop

Raspberry Pi -

Some of you will be aware that we’ve been working on a new, more responsive and more modern desktop experience for the Raspberry Pi. We thought you might like an update on where we are with the project.

The chip at the heart of the Raspberry Pi, BCM2835, contains an extremely powerful and flexible hardware video scaler (HVS), which can be used to assemble a stack of windows on the fly for output to the screen. You can see this as being a much more complicated version of the sprite capabilities you may remember from 8- and 16-bit computers and games consoles from the Commodore 64 onward.

The Wayland compositor API gives people like us a way to present the HVS to applications in a standards-based way. Over the last year we’ve been working with Collabora to implement a custom backend for the Weston reference compositor which uses the HVS to assemble the display. Last year we shipped a technology demonstration of this, and we’ve been working hard since then to improve its stability and performance.

The “missing piece” required before we can consider shipping a Wayland desktop as standard on the Pi is a graphical shell. This is the thing that adds task launching and task switching on top of the raw compositor capabilities provided by Wayland/Weston. The LXDE shell we use under X on the Pi doesn’t support Wayland, while those shells that do (such as Gnome) are too heavyweight to run well on the Pi. We’ve therefore been working with Collabora since the start of the year to develop a lightweight Wayland shell, which we’ve christened Maynard (maintaining the tradition of New England placenames). While it’s some distance from being ready for the prime time, we though we’d share a preview so you can see where we’re going.

Packages for Raspbian are available (this is a work in progress, so you won’t be able to replace your regular Raspbian desktop with this for general use just yet, and you’ll find that some features are slow, and others are missing). Collabra have made a Wiki page with compilation instructions available: and there’s a Git repository you can have a poke around in too.

Mudra: a Braille dicta-teacher

Raspberry Pi -

Sanskriti Dawle and Aman Srivastav are second-year students at the Birla Institute of Technology and Science in Goa. After a Raspberry Pi workshop they decided they wanted to do something more meaningful than just flash LEDs on and off, and set this month’s PyCon in Montreal as their deadline.

Aman Srivastav and Sanskriti Dawle

They ended up producing something really special. Mudra means “sign” in Sanskrit: the Raspberry Pi-based device is a learning tool for visually impaired people, which teaches Braille by translating speech to Braille symbols. Braille literacy among blind people is poor even in the developed world: in India, it’s extremely low, and braille teachers are very, very few. So automating the teaching process – especially in an open and inexpensive way like this – is invaluable.

In its learning mode, Mudra uses Google’s speech API to translate single letters and numbers into Braille, so learners can go at their own speed. Exam modes and auto modes are also available. This whole video is well worth your time, but if you’re anxious to see the device in action, fast-forward to 1:30.

Sanskriti and Aman say:

Mudra is an excellent example of what even programming newbies can achieve using Python. It is built on a Raspi to make it as out-of-the-box as possible. We have close to zero coding experience, yet Python has empowered us enough to make a social impact with Mudra, the braille dicta-teacher, which just might be the future of Braille instruction and learning.

We think Mudra’s a real achievement, and a great example of clean and simple ideas which can have exceptional impact. You can see the Mudra repository on GitHub if you’d like a nose around how things work; we’re hoping that Sanskriti and Aman are able to productise their idea and make it widely available to people all over the world.

Books, the digitising and text-to-speechifying thereof

Raspberry Pi -

A couple of books projects for you today. One is simple, practical and of great use to the visually-impaired. The other is over-complicated, and a little bit nuts; nonetheless, we think it’s rather wonderful; and actually kind of useful if you’ve got a lot of patience.

We’ll start with the simple and practical one first: Kolibre is a Finnish non-profit making open-source audiobook software so you can build a reader with very simple controls. This is Vadelma, an internet-enabled audio e-reader. It’s very easy to put together at home with a Raspberry Pi: you can find full instructions and discussion of the project at Kolibre’s website.

The overriding problem with automated audio e-readers is always the quality of the text-to-speech voice, and it’s the reason that books recorded with real, live actors reading them are currently so much more popular; but those are expensive, and it’s likely we’ll see innovations in text-to-speech as natural language processing research progresses (its challenging: people have been hammering away at this problem for half a century), and as this stuff becomes easier to automate and more widespread.

How easy is automation? Well, the good people at Dexter Industries decided that what the Pi community (which, you’ll have noticed, has a distinct crossover with the LEGO community) really needed was a  robot that could use optical character recognition (OCR) to digitise the text of a book, Google Books style. They got that up and running with a Pi and a camera module, using the text on a Kindle as proof of concept pretty quickly.

But if you’re that far along, why stop there? The Dexter team went on to add Lego features, until they ended up with a robot capable of wrangling real paper books, down to turning pages with one of those rubber wheels when the device has finished scanning the current text.

So there you have it: a Google Books project you can make at home, and a machine you can make to read the books to you when you’re done. If you want to read more about what Dexter Industries did, they’ve made a comprehensive writeup available at Makezine. Let us know how you get on if you decide to reduce your own library to bits.

New Raspbmc update!

Raspbmc -


There’s a lot that’s new — after all, it has been three months since the last update. The update before the New Year put the project in solid standing and I felt that the project was maturing. Rather than release small incremental updates each month, I decided to let things rest a while. There wasn’t that much to fix or push — so I took a step back.

In the past couple of months, I’ve been working on a few things, including working with two hardware developers to establish a reference platform for the upcoming linXBMC project, speaking to a prominent Internet streaming company about adding their service in a less ‘hacky’ way and trying to get more resources for the upcoming project. More will be revealed on that soon.

As we get increasingly near to the release of XBMC 13 (Gotham), I’ve done the following:

  • I’ve cleaned up the nightly builds list. Although there were plenty of builds available, it was quite messy, and users were not sure why they should try one build over another.
  • I’m producing 24 hour nightly builds of XBMC 14.0
  • I’ve published all XBMC 13.x Betas — which are installable via Raspbmc Settings
  • I have now prepared all the patches for XBMC 13 (Gotham), meaning that upon its announcement by Team-XBMC as final, I will release a build for Raspbmc a few hours later as an update.
  • Those wishing to stay with Frodo will not be left in the dark however. If you’d like to stay with Frodo, perhaps because it’s tried and tested, or perhaps because you have a shared library and you need to stay on the 12.x series, then not to worry. I have made a stable 12.3 build and that’s pushed as an update today. Even when Raspbmc moves to Gotham, this Frodo build will be kept available to install via Raspbmc Settings.

Here’s what’s new to Raspbmc as a whole:

  • Updated build filesystem to satisfy new XBMC build dependencies and fix a locales issue
  • Fix an overclock setting for ‘Fast’ mode that would force a high (and potentially incompatible) PLL divisor
  • Allow XBMC to adjust task priority for improved playback performance
  • Fix for the Heartbleed vulnerability. Note that this affects both clients as well as public facing servers, so fixing this issue was important.
  • Fix a bug where playback fails when accessing files from WebDAV or HTTPS shares
  • Firmware is updated to resolve issues with CEC on Panasonic sets and bring improvements to playback
  • Updated the standalone image to the latest version of XBMC, kernel and firmware

Here’s what’s new, thanks to XBMC Gotham will bring the following features and improvements:

  • Issues streaming with iOS 7 using AirPlay are now fixed completely
  • In the past couple of months, some new sound cards for Raspberry Pi have come out, so I’m adding support for the following sound cards:
    • Wolfson Microelectronics Raspberry Pi Module – Wolfson’s patches for this had issues, so I’ve done my best to manually resolve these myself. I have reached out to a developer at Wolfson who tells me patches will be released in the future.
    • HiFiBerry sound cards
    • IqAudio sound card
  • Add ALSA support to XBMC Frodo without need for manually enabling in Raspbmc Settings. This approach is done with ‘dvdplayer’ rather than an OpenMAX ALSA component.
  • Improved JPEG to texture decoding (thanks Ben Avison)
  • Hardware accelerated resampling and downmixing (thanks Dom)
  • dvdplayer with OMXPlayer acceleration:
    • this provides full DVD menu support and is suitable for playing back most content. To use ‘dvdplayer’ instead of the standard omxplayer, you need to select ‘Play with’ which can be done by invoking the context menu on the file that you would like to play. This is necessary for sound output with ALSA. omxplayer is being kept as the default player as it is more capable of playing back HD content; dvdplayer with OMX acceleration falls down with Blu-ray playback.
  • I have added support for encrypted DVDs — and in turn, the ability to play straight from DVDs with an external drive
  • ALSA sequencer support added for external sound cards
  • Adjust read buffer factor for better buffering of content and less pausing during playback
  • Ensure the web server is on by default with no username necessary for XBMC Gotham — allowing the user to use their smartphone to control Raspbmc out of the box without additional input devices

To accelerate development on the new project, linXBMC, I’ll be holding a competition soon, stay tuned for an announcement! I think I’ll be changing the name soon, so that may give you a hint as to what the competition might involve! The new content delivery network is coming along soon, and I hope to make the switchover to the new system later this month. The Raspbmc Shop will offer international shipping by the end of the week and more competitive pricing too!

To get the update, all you need to do is reboot your Raspberry Pi. If you’re running an XBMC nightly, be sure to switch to ‘xbmc release’ in Raspbmc Settings to get back on the stable Frodo build. If you’d like to try the vanilla Gotham builds: they are installable via Raspbmc Settings; however I’d recommend the custom Raspbmc build ‘Gotham-Raspbmc-Release’ which has support for sound cards, DvdPlayer support and the JPEG texture handling improvements. The process for playing back with an external sound card is not yet streamlined (it will soon simply involve a Raspbmc Settings based checkbox to enable), so for now you should see this thread for information.

If you enjoy Raspbmc, and this update, and would like to support continued development, you can make a donation here.

As always, enjoy!

MagPi issue 22

Raspberry Pi -

I’m about two weeks late to the party on this one – massive apologies to all at The MagPi. It’s been a bit busy around here so far this month. Right now, Picademy’s underway in the office space we’ve got set up as a classroom, and 24 teachers are busy making blooping noises with Sonic Pi while Clive booms at them in Teachervoice. It’s distracting but curiously enjoyable.

Alongside the preparation for Picademy, this month we’ve seen the launch of this new website, and the announcement about the new Compute Module. While all this was going on, the April edition of The MagPi came out, and I didn’t notice because I was too busy glueing Raspberry Pi logos on sticks and sending boxes of jam to Johnny Ball (true story).

 As usual, The MagPi is full of wonderful things like internet-enabled garage doors, night lights that repel under-bed goblins, reviews, competitions, tutorials and much more. My favourite article this month discusses a solar cell (this month’s cover star) that tracks the sun to provide 140% more energy than a static cell. Go and read it online for free: you can also order a printed copy for your personal library or for your school. Thanks MagPi folks – I promise to be more timely about letting people know about next month’s issue!

Lumsing 11000mAh Li-on Battery Power Bank Test

Raspberry Pi Spy -

Over the last two years I’ve acquired a set of portable USB power banks. These are great for powering the Pi and the larger ones can keep a Pi running for many hours. In previous posts I’ve tested standard AA batteries,  a generic Li-on Power Pack and a RAVPower 10400mAH Power Bank.

Now it’s the turn of the Lumsing 11000mAH power bank. This device is slightly unusal in that it has 5 USB outputs. Yes five. This gives you the chance to run 5 devices from it. In a future post I’ll see what I can run off it but for this test I’ll just be using a single 1A rated port.

Lumsing Power Bank (PB-AS008)

The package contained the following items :

  • Power Bank unit
  • 2 USB-to-MicroUSB cables
  • Carrying pouch
  • Instruction manual

and has the following features

  • 11000mAh capacity
  • 40.7Wh
  • 5 USB output ports (0.5,1,1,1.3,2.1A)
  • 1 MicroUSB input port for charging
  • 4 stage blue LED status bar
  • On/Off switch

The battery had some charge in it when I first switched it on but I charged it fully before I attempted to use it. As it charged the blue LEDs showed the progress.

Test Setup

Once it was charged I got ready for the test. The Pi was setup with the following equipment :

  • Raspberry Pi (Rev 2)
  • BerryClip addon board
  • SD card with Raspbian
    “Wheezy” (2013_02_09)
  • Lumsing 11000mAh Power Bank
  • USB to MicroUSB cable
    (as supplied with the Power Bank)
  • Python script as used in my AA battery shootout post

The Pi was networked and I used Putty to connect to it from PC. This terminal was used to set off the Python script with the following command :

sudo python battery_uptime_test.py

The current uptime was updated in the Putty window and I just left it running. When the power runs out the time left in the Putty windows gives me the total uptime.

Predicted Battery Stamina

My eBay 12000mAh Power Bank lasted 18 hours 40 minutes (1120 minutes).

The RAVPower 10400mAh Power Bank lasted 17 hours 55 minutes (1075).

So a good guess would be (11000/10400)*1075 = 1137 minutes compared to the RAVPower’s slightly lower stated capacity. That would give us 18 hours and 57 minutes.


The Lumsing pack lasted 19 hours 22 minutes (1162 minutes). This is almost 30 minutes longer than the prediction. The Pi isn’t doing much in this test but it showed the Lumsing was in the same league as the RAVPower.

The Lumsing 5-port 11000mAh External Backup Battery Pack is available from Amazon.com :

Lumsing 11000mAh 5 x USB External Battery Pack


Here is a set of additional photos I took of the battery pack and my Pi setup:

Heartbleed vulnerability

Raspbmc -


I’m posting this to reassure users about the Heartbleed bug and Raspbmc. This vulnerability is now patched — to get the update, you need to just reboot your device (make sure you have updates enabled in Raspbmc Settings). If you weren’t running a front-facing service, i.e. an HTTPs enabled web server on your device (which is unlikely), that’s all you need to do to stay safe.

I’ve posted a bit more on my personal blog about the vulnerability and how to check that you are up to date.


(And yes, an update is coming soon. Very soon.)

BitScope Micro

Raspberry Pi -

We met the folks from BitScope some months ago to talk about their plans for a miniature scope especially for the Raspberry Pi. They’ve just launched the product we discussed then today, and our socks have been comprehensively knocked off by it; the engineers who sit behind me think this is one of the most exciting Raspberry Pi add-ons they’ve seen so far.

This is the BitScope Micro, built especially for the Raspberry Pi. It turns your Pi into a dual channel digital oscilloscope, a multi-channel logic analyser, a waveform and clock generator and a spectrum analyser; it comes bundled with BitScope’s full suite of software (well worth a look if you’re even slightly interested – this thing has features coming out of the wazoo), and it’s probably the cheapest digital scope we’ve ever seen, coming in at USD $95 if you buy in volume, and $145 at one-off retail. You can read much more at BitScope’s website.

Sample output

More sample output

We think that’s an incredibly good deal – for the same analogue bandwidth in a bench scope you’re looking at an instrument that’s many, many times the price, even at retail.

The BitScope Micro comes bundled with ten signal clips and a USB cable.

It’s exciting for us to see proper scientific instrumentation coming to the Pi; we’re looking forward to seeing what the community does with tools like the BitScope Micro. Give us your ideas in the comments.


New how-to animation – special guest star!

Raspberry Pi -

We’ve just taken delivery of another video from the lovely guys at Saladhouse Animation. This one’s for the new Quick Start page, to help out all those beginners who have asked which cables go where, and what they do.

UK readers over 30 or so might recognise the voice of our animated presenter.

Massive thanks, as always, to Sam Alder and Scott Lockhart at Saladhouse, who we love working with; they’re some of our favourite people. But the biggest thanks of all has to go to my childhood hero (he’s also the childhood hero of all the actual grown-ups in the office) – without this guy’s influence when I was a kid, I wouldn’t have ended up loving science, and I wouldn’t have ended up working on Raspberry Pi. Here he is at the recording session with Sam (mouth) and Scott (tall):

That’s the LEGENDARY Johnny Ball. Johnny donated his time and his voice talent to the Raspberry Pi Foundation, and we couldn’t be more grateful: Johnny, please watch out for the postman next week, ‘cos we’re sending  you a present to say thanks.

Pirate-ing By Numbers

Pimoroni -

100,000 Pibows hurrah! Introduction...

100,000 Pibows manufactured, with love, by the Pimoroni Pirate Crew in our workshop (Sheffield, UK) 24,432 PCBs assembled on the pick and place machine since it was installed in May last year 17,078 Orders placed through our online shop and shipped directly from our warehouse 900 Square feet of space in our original workshop - we crammed three laser-cutters in there 709 Products added to our online store since it launched in February 2012 695 Days of continuous laser cutting time (or roughly 10 minutes per Pibow) 675 Miles travelled by the laser heads. That's the distance from our workshop to Oslo, Norway! 122 Support e-mails asking why the lid and base weren't transparent like in the photos 20 Months since it all started. We put the original pibow.com website up on July 17th 2012 16 Kilometers from start to finish cover if you laid every Pibow bolt we've ever used end to end 9 Full-time staff in development, production, packaging, shipping, and customer support 5 Laser-cutters named Bert, Ernie, Cookie Monster, Waldorf, and Statler who never get a break 1 Raspberry Pi was where it all started when Paul queued up on launch day to try and snag one

Meet Jasper: open-source voice computing

Raspberry Pi -

Meet Jasper. He’s like Siri, but much better, in that it’s open-source and completely customisable. All you need to set up your own is a microphone, a speaker, and a Raspberry Pi.

Jasper already comes with modules to deal with things like time, weather, Gmail, playing your Spotify music, news (and what’s on Hacker News)…and knock knock jokes. You can build your own modules to add more functionality. We’re really impressed by how well-documented Jasper is; new developers should be able to get to grips with building on the platform very easily, and we’re looking forward to watching what you guys get up to with it.

Easy as Pi Piano

Raspberry Pi -

I’m on the fence about whether or not this is an effective way to learn how to play the piano: but it’s definitely an effective way to learn about electronics, Python, servo motors, and why lasers are cool. Shane Snipe and his dad took about 50 hours to put this project together – astonishingly, neither of them had ever written any Python before they started the project.

Over at YouTube, Shane says:

My dad and I made the Easy as Pi Piano system to make learning chords faster and easier. This project took about 50 hours to complete due to the fact that we were new to the Python programming language. The Easy as Pi Piano system functions as a piano teacher. Learn to play the chords to your favorite song! The servo motor lasers show you which keys to play. Slow it down or speed it up with the scale. On the monitor, you will see the finger placements, the current chord, and the lyrics to the whole song. We hope that our hard work makes learning how to play piano easy as pie.

Thanks Shane, and thanks Dad!

Raspberry Pi Compute Module: new product!

Raspberry Pi -

As regular readers will know, it’s been a busy time here at Pi Towers recently with the launch of our new website, free educational materials and £1m education fund.

On the engineering side of things we’ve also been very busy over the past year, and not to be outdone by the education team, we are ready to take the wraps off something special, this time aimed at business and industrial users.

What’s this little thing? Read on to find out.

From humble beginnings, the Raspberry Pi platform has grown and matured: the software is now full-featured and stable, and is still constantly improving thanks to the continuing hard work of our heroic community of volunteers; as well as targeted injections of funding to solve some specific issues. The Pi, and the Broadcom BCM2835 SoC at its heart, are also steadily becoming more open.

We love hearing about what users are doing with their Raspberry Pis, and are constantly amazed at the range of projects, as well as the inventiveness and creativeness of the community. We are also aware that there are a very significant number of users out there who are embedding the Raspberry Pi into systems and even commercial products. We think there needs to be a better way to allow people to get their hands on this great technology in a more flexible form factor, but still keep things at a sensible price.

Like proud parents, we want to free the core technology of the Raspberry Pi to go forth and become an integral part of new and exciting products and devices, and so today we are announcing the forthcoming Raspberry Pi Compute Module.

Compute Module on the left. What does it do? Read on to find out.

The compute module contains the guts of a Raspberry Pi (the BCM2835 processor and 512Mbyte of RAM) as well as a 4Gbyte eMMC Flash device (which is the equivalent of the SD card in the Pi). This is all integrated on to a small 67.6x30mm board which fits into a standard DDR2 SODIMM connector (the same type of connector as used for laptop memory*). The Flash memory is connected directly to the processor on the board, but the remaining processor interfaces are available to the user via the connector pins. You get the full flexibility of the BCM2835 SoC (which means that many more GPIOs and interfaces are available as compared to the Raspberry Pi), and designing the module into a custom system should be relatively straightforward as we’ve put all the tricky bits onto the module itself.

So what you are seeing here is a Raspberry Pi shrunk down to fit on a SODIMM with onboard memory, whose connectors you can customise for your own needs.

The Compute Module is primarily designed for those who are going to create their own PCB. However, we are also launching something called the Compute Module IO Board to help designers get started.

Empty IO Board on the left: Compute Module snapped into place on the right.

The Compute Module IO Board is a simple, open-source breakout board that you can plug a Compute Module into. It provides the necessary power to the module, and gives you the ability to program the module’s Flash memory, access the processor interfaces in a slightly more friendly fashion (pin headers and flexi connectors, much like the Pi) and provides the necessary HDMI and USB connectors so that you have an entire system that can boot Raspbian (or the OS of your choice). This board provides both a starting template for those who want to design with the Compute Module, and a quick way to start experimenting with the hardware and building and testing a system before going to the expense of fabricating a custom board.

IO Board

Initially, the Compute Module and IO Board will be available to buy together as the Raspberry Pi Compute Module Development Kit.

These kits will be available from RS and element14 some time in June. Shortly after that the Compute Module will be available to buy separately, with a unit cost of around $30 in batches of 100; you will also be able to buy them individually, but the price will be slightly higher. The Raspberry Pi Foundation is a charity, and as with everything we make here, all profits are pushed straight back into educating kids in computing.

I’m sure people will be keen to get their design process started; initially we are releasing just the schematics for both the Compute Module and IO Board, but we will be adding plenty more documentation over the coming days and weeks.

Happy creating!

*But don’t go plugging the Compute Module into your laptop – the pins assignments aren’t even remotely the same!

How To Change The Command Line Font Size

Raspberry Pi Spy -

If you are using your Raspberry Pi with a smaller screen you may want to change the font used on the command line to make it easier to read. I usually do this when I am using various portable LCD screens (eg the HDMIPi).

It only changes the font within the console if you are using a screen connected directly to the Pi. It won’t affect Putty/SSH sessions.

Changing the font size on the console is easy to do and there are two methods you can choose.

Method 1

This method uses a system utility called “dpkg-reconfigure”. Run it using the command shown below :

sudo dpkg-reconfigure console-setup

This will launch a “Package Configuration” screen :

Using the up/down arrow keys select “UTF-8″. Using the right arrow key select “OK” and press ENTER.

Using the up/down arrow keys select “Guess optimal character set”. Using the right arrow key select “OK” and press ENTER.

Using the up/down arrow keys select “Terminus”. Using the right arrow key select “OK” and press ENTER.

Using the up/down arrow keys select “16×32″. Using the right arrow key select “OK” and press ENTER. There will be short delay before you are returned to the command prompt with the new font size. 16×32 is a font size that will be twice the size of the default.

See below for a video showing this method.

Method 2

This method involves editing a system file called “console-setup”. You just need to load it into your preferred text editor and tweak a few lines :

sudo nano /etc/default/console-setup

You will see the default settings :

Using the arrow keys position the cursor and change the FONTFACE and FONTSIZE lines to :

FONTFACE="Terminus" FONTSIZE="16x32"

Your file should look something like this :

Press CTRL-X, then Y then ENTER to save the changes.

To apply these new settings to your command prompt without rebooting you can run the following command :

sudo /etc/init.d/console-setup restart

See below for a video showing this method.


Here is a video showing both methods. I created it using Putty on my Windows PC so it may look slightly different to your setup but the process is the same.

Which method you use is up to you. I tend to use Method 1 the first time I change the defaults and then Method 2 if I need to make a quick change at a later date. Method 1 is actually possible even if the current font size is unreadable as you can follow the screenshots above and do most of it with guess work!

BerryClip Assembly Articles, Videos and Reviews

Raspberry Pi Spy -

This page aims to collate a set of videos and website articles created by other people showing BerryClip and BerryClip+ related assembly guides, reviews or projects. Hopefully this will make it nice and clear for Pi fans who are little bit nervous about soldering or are just curious as to what the kit looks like in reality.

There is nothing like seeing other peoples’ thoughts on a product before buying one yourself so hopefully these are useful.

Soldering Videos

“Raspberry Pi 6 LED BerryClip” by Graham Taylor

Construction Guides

Gary’s Blog – Soldering steps with photos

BerryClip Projects

“How to use your Berry Clip” by Raspberry Pi Tutorials for Complete Beginners


“Raspberry Pi – BerryClip” by RaspberryPiIVBeginners

BerryClip+ for the #RaspberryPi review by recantha


HDMIPi Raspberry Pi HD LCD Screen (Beta)

Raspberry Pi Spy -

Alex Eames from RasPi.tv very kindly gave me a beta version of the HDMIPi screen for the Raspberry Pi along with some stickers*. This was a project funded via a successful Kickstarter campaign which aimed to raise £55,000. In the end it raised £261,250. Which was nice!

Small HDMI screens are expensive. Native HD ones are astronomical. We want to drive the price down “Raspberry Pi” style.

I backed the project when it started as I wanted a portable screen and I knew I could trust Alex and the Cyntech team to deliver. It was a very nice surprise to get my hands on the screen so I could start to have a play.

Note: The screen and associated hardware Alex gave me is a beta model. Any of it may change by the time people receive their orders as there are a number of improvements and tweaks being made. The controller board in particular is going to look different and may have different connectors on it.


The screen itself is 9″ 1280×800 LCD which is the same resolution as the excellent Nexus 7 tablet. It is 4 mm thick with a 5 mm bezel around the edge (approx). The bezel along the bottom is slightly wider at 8 mm. This is going to making it perfect for mounting in DIY enclosures. On the rear of the screen is a ribbon cable which connects to the controller board (via 51-40 way converter).

The quality of the screen is great. It’s really hard to say much more than that given screen properties are quite subjective. However it stands up well against the other screens I use on a daily basis. The screen pixel density is good enough to use the terminal or LXDE graphical interface without any major adjustments. Although I’m sure owners will prefer to tweak font sizes etc in order to suit their projects and/or eyesight.

Controller Board

The controller board accepts a 12V DC input and provides the sockets required to connect it to your Pi. The HDMI input means you could connect it to other devices which opens up possibilities for photographers and camcorder users.

The board can run from 12V but I successfully powered it from a 5V USB RAVPower Power Bank. This was great as I was able to power the screen and a Pi at the same time without needing any mains power. This might simplify projects that require the setup to be portable. It has been suggested that the final board would have a USB port allowing a Pi to be powered at the same time, eliminating the need for two power supplies.


The buttons are mounted on a separate board which is in turn connected to the controller board by a ribbon cable. The buttons provide Power, Menu, Up, Down, Source/Back functionality and if you’ve ever used the controls on a PC monitor you won’t have any trouble with these. I managed to use them without reading the instructions.


It isn’t very practical to use the screen on it’s own with the controller board and ribbon cables unless you plan to make your own case. An enclosure of some sort is going to be vital for most users but luckily the HDMIPi Team is also taking care of that. They have got a prototype case which is similar in principle to the Pimoroni PiBow case. That is a sandwich of layered plastic. There are some good photos on the official enclosure page.

I didn’t pledge for an enclosure because I wanted to wait and see exactly what I was going to use the screen for. The prototype case looked cool when I saw it so I suspect I will buy one of those when the time comes.

Final Changes

Since receiving this equipment there have been a number of new announcements about the refined specifications. It is likely that the controller board will not include the VGA or Composite connectors although the VGA pins will still be available on the board. The good news is that this means there will be space for an extra HDMI connector. This won’t suit everyone but two HDMIs is a very attractive feature as far as I am concerned.

For official updates make sure you follow @HDMIPi on Twitter. It’s also worth considering following @Cyntech1 and @RasPiTV for other Pi related tweets.

The official website is hdmipi.com and you can place pre-orders!

* I carefully hid a sticker in one of the photos. See if you can spot it

PA Consulting Raspberry Pi Competition

Raspberry Pi -

The PA Raspberry Pi competition challenges young people to use the Raspberry Pi to help the environment. Last year I helped judge the competition, and was amazed by the creativity and innovation of the entries (the excellent AirPi was one of last year’s winners). This year’s event was held in the Science Museum, and I went along to judge the Year 4-6 and Year 7-11 categories, and to run some workshops along the way.

The Sonic Pi workshops were fantastic—they almost ran themselves, with the students continually trying out new things in quest to make the best music or silliest sounds (the exploding farmyard was a particular favourite). I’ve said it before, but Sonic Pi is genius.

In the afternoon I joined my fellow judges: Rory Cellan-Jones, the BBC’s technology correspondent, and Claire Sutcliffe, co-founder of Code Club. We spent 15 minutes talking to each of the seven teams.  The winning project had to have the potential to benefit the world in some way and we were also looking for things like innovation, creativity and originality. What really stood out was the energy of the teams—they all talked passionately and knowledgeably about their projects and how they had used the Raspberry Pi to solve real world problems.

St Mary’s CE Primary, with Pi ‘n’ Mighty, their recycling robot

The year 4-6 category was won by St Mary’s CE Primary School with their recycling robot Pi ‘n’ Mighty. The robot scans packaging barcodes and then tells you if it can be recycled and which bin to put it in. The team was bursting with energy and falling over themselves to explain how they’d made it and what it did. I’d love to see a Pi ‘n’ Mighty in every school canteen, encouraging recycling and helping children learn about the topic. And it looks fantastic, exactly how a robot should look!

Frome Community College won the year 7-11 category prize with their prodigious Plant Pi, a system to care for plants and monitor their environment. The team had covered every aspect including hardware and web monitoring, and they had even created an app. It really is a brilliantly designed and engineered solution that already has the makings of a commercial product. The project is open source and includes code, instructions, parts list and documentation.

It was a great day and it was a real pleasure to speak to the finalists and to see young people doing remarkable and useful things with the Raspberry Pi. If I could bottle the innovation, enthusiasm, creativity and technical skills in that room then I would have a Phial of Awesome +10. (I would carry it around with me in a belt holster and open it for the occasional sniff when feeling uninspired.) Best of all, I know that we’ll be seeing some of these finalists again: skills like computational thinking stay with you for life, and will serve these kids in whatever they end up doing in the future.

Celebrating The New RaspberryPi.org Website Design

Raspberry Pi Spy -

For a number of months the Raspberry Pi Foundation has been planning a website re-design. They have also been putting together an education hub that would make lots of learning resources available to teachers, parents, kids and hobbyists.

On 1st April the www.raspberrypi.org site got a facelift. It wasn’t what most people where expecting. For some the black background and lime green text was too much. For others it was a chance to relive the 1990′s.

Luckily this brief nostalgia trip didn’t last and the 2nd April saw the release of the genuine re-design. Here is a video I created to mark the release of the new design while showing how the site has changed over the last three years :

I’m liking the new design. The navigation is clear and simple and the whole feel will be friendlier to new users. If in doubt a single click on the “Help” option will have people up and running in no time. Even the download page has been lovingly re-styled.

The next step is a new theme for mobile devices. Congratulations to the Raspberry Pi Foundation Team!

Announcing our million-pound education charity fund

Raspberry Pi -

It’s been a busy month for us here at Pi towers, and after the recent announcement of Picademy and the launch of the new website with an increased focus on educational resources, you may be wondering what’s next for our educational mission.

Without disappearing too far down the rabbit-hole of superlatives, I can say we are all super-excited to announce the launch of the Raspberry Pi Foundation Education Fund. Thanks to the support of the community over the past two years through buying Raspberry Pis and building inspiring, innovative projects, we’ve been able to build up a bag of funds to spend on our education mission. So today we are announcing a £1 million education fund.

Emma has been busy getting artistic with the folding stuff this morning.

This fund is in support of our core chartable mission, so we are looking to fund innovative and exciting projects that enhance understanding of and education in computing for children aged between 5 and 18.  The fund does not exclusively target Computing as a subject; we are also interested in supporting projects that demonstrate and promote the use of computing technology in other subjects, particularly STEM and the creative arts.

Our aim is to support a range of projects: from those that increase participation, to those that target excellence. Given our charitable status, priority will be given to organisations that have a not-for-profit ethos. The fund will operate through match funding, so not only are we wanting to hear from people with potential projects ideas; we are also wanting to hear from industry and third-sector partners who’d be interested in co-funding some of the projects.

If you’d like to know more about the fund, how it will operate and how to make an application, you can find out more on our Education Fund page.



RaspberryCenter.de Aggregator – Englisch abonnieren