Is the Raspberry Pi the future of computing?

The $25 box that could revolutionise programming

Over the last few decades, it's fair to say that computers, and technology more broadly, have developed at a staggering pace.

In the 1980s, for example, MS-DOS was a state-of-the-art operating system. This meant that to use almost any computer, the user had to interact with a command prompt. There was no point-and-click GUI, at least not by default, and the user had to know a little about the system before they could make it do anything.

Today, in the mainstream, iOS is the state-of-the-art operating system. Users have to know nothing about their computer (because that's what phones and tablets are) to make it do anything - they can just touch the big, pretty buttons and things happen. They have no idea how any of this works - it's all magic to them.

Even on Linux, so often regarded as a geek's operating system, interfaces are graphical, and you need to know only a bare minimum about the system to get it set up and working. This all sounds like progress, but if you look a little closer, it starts to become apparent that the future we find ourselves in is not so rosy. At least, that's what an increasing number of educators, professional programmers and computer enthusiasts have been saying over the last few years.

But we're about to introduce you to one of the most exciting projects that's emerged to help redress the balance: the Raspberry Pi, a tiny, $25 computer, which runs Linux and is going to change the world (well, at least British computer education!).

Along the way, we're going to be finding out what exactly it is about this brave new world that's so problematic, how it is hoped the Raspberry Pi will rectify those things, and what other efforts exist to fix these problems.

What's the big idea?

To find out more about the problems caused by the technological developments laid out above, and about the Raspberry Pi, we met with Dr Robert Mullins, one of the Raspberry Pi Foundation's trustees.

He began by telling us about the project's origins: Eben Upton, who Robert described as the project's catalyst, had been working as the director of studies for the computing programs at St John's College, Cambridge. As part of this role, he was responsible for overseeing the admissions process, and began to notice a steady decline in the applicants' programming skills, and in the number of students applying.

For those, like Eben and Robert, who were in university computer departments, and who are passionate about computers in general - and the role they can play in a thriving economy, this was obviously a worrying trend.

Less capable students at the start of a degree obviously means that more time will be spent teaching the practical prerequisites, such as programming; and less time will be spent on higher-level topics, such as advanced data structures. Less students applying means that industries such as game and software development (big in the UK) will have a smaller talent pool from which to draw the next generation of employees.

When it came to identifying the reasons behind this trend, Eben, Robert and their colleagues came up with a laundry list of possible explanations. At its heart, however, was the idea that children today are distracted by other things and have less ready access to machines on which they can code and experiment.

When the developments in the computing landscape are overlaid on top of this observation, it's not difficult to see why this has happened. Computers have become arcane, hiding away the command line and their internal machinations. They've also become expensive, so any attempts by children to look beyond the polished surface are often discouraged by parents. Who could blame them, either, when they've paid so much in the first place and any attempts to repair them will involve a call to an expensive professional?

Having identified some possible causes behind this trend, Eben, Robert and others decided that one way they might be able to set about reversing it was to create a cheap platform that would encourage children to find out what computing is really about; that would give them an opportunity to play with and explore computers, just like they, themselves, did in the 1980s.

This diminutive computer is capable of anything that a desktop PC can do, including outputting HD graphics through an HDMI connection. So, they started planning, designing and hacking, and you know what? They've succeeded.

What they managed to come up with is a computer the size of a credit card, capable of running almost any program a desktop PC can, and that costs just $25 or $35, depending on which model you buy.

Pick a Pi

Model A is slightly less capable, coming with 128MB RAM, one USB port and no Ethernet connection; it will cost $25. Model B comes with 256MB RAM, two USB ports and an Ethernet connection; it will cost $35.

The rest of the components are common to both devices: the most important is the Broadcom BCM2835 System on a Chip (SoC), which includes an ARM 11 700Mhz processor, a Videocore 4 GPU. The RAM, already discussed, sits directly on top of the SoC, so it's not user-replacable.

The choice of this SoC has some remarkable implications for the device itself. For starters, it has very low power consumption, meaning it's possible for the entire system to be run off 4 AA batteries. In spite of this low power consumption, it has a very powerful GPU, too. The GPU is capable of high definition video playback, using H.264, at 40 MBits/s, and it has fast 3D processing capabilities, on a par with the first XBOX, and which out-performs the iPhone 4S.

The RAM, processor and GPU are obviously the core specifications, but there are a few other vital statistics that you might want to know about. One of the driving ideas behind the device was that you would need as few extra peripherals as possible to get it working. This would save children and parents money and, as a consequence, reduce the barrier to entry.

Of course, one of the most expensive computer peripherals is the monitor, but since the Raspberry Pi is capable of outputting high definition video, the obvious solution to this is to make it capable of working with a standard television. Included on the device, then, are HDMI and RCA video outputs. That's one output for modern TVs and computer monitors, and one that will work for almost any TV made over the past decade.

The other big question that people will be asking is 'what about storage?' Well, there's no hard drive, just an SD card port. You can run the device from a USB hard drive, too, but it first has to be booted via an SD card.

This might sound strange, but it has one huge advantage: you can't brick the device. If something goes wrong, simply remove the SD card, reflash it, and then you're ready to go again.

All of this comes in a package that's just 85.60mm x 53.98mm x 17mm - if you sit a credit card on top, it covers the device perfectly - and is powered by MicroUSB, the power connector that's now standard for all mobile phones sold in the EU.

Software

That's all you need to know about the device itself, but as readers of a Linux magazine, you must be asking yourselves 'what does this run?'

The answer is almost anything that can run on ARM. Given the power of these devices, that translates to almost any Linux distribution, a complete set of desktop applications - games, etc - too - and a wide range of programming languages and APIs.

'Almost' is an important caveat here, however: to use the GPU, any distribution that runs on the Raspberry Pi will need to include a set of closed-source libraries. One provides access to 3D acceleration, one to 2D acceleration, one provides an interface between these and the native window system, and the last provides access for accelerated multimedia work.

All but the last of these can be included in distributions as drop-in replacements for existing components, so integrating them should require very little work. But for the distributions to run on the devices, they'll need to be modified to work with these alternative libraries.

By default, the SD cards will come with a version of Fedora that's already compiled for ARM, and has the necessary libraries included. Other distributions that will be officially supported include Debian and Arch Linux, and you'll be able to download images of these from the Raspberry Pi site at launch.

One significant aspect of the software on these devices is that they're not going to boot to X. X will be available, but you'll have to start it yourself after logging in to a Getty terminal. The idea is that by introducing users to the command prompt, they'll discover gently that what happens behind the scenes isn't out of bounds, but there to be experimented with.

Robert told us that: "If you can give people a bit of education in the basics of programming, it can become an incredibly creative activity that anyone can really run with."

It's this principle that they're applying to the operating system, too - if you can just introduce them to the command line, and some basic commands, a whole world opens up to them.

New curriculums

Of course, simply having the device isn't enough to help children learn to program. Thinking back to the 1980s once more, there was a wealth of material available for the budding computer enthusiast that would help them orientate themselves. This included books and magazines, which provided code samples to demonstrate new techniques and often raised the humble developer to the level of cult celebrity (search for Birth of a Paradroid if you're looking for examples).

It also included populist television series: the BBC created shows such as The Computer Programme and Micro Live to help users of their own BBC Micro systems; these shows also looked at other computers and technology as a whole and, as a result, helped develop an enthusiastic, knowledgeable audience of computer- and techno-philes.

This need for resources to accompany the device isn't something that has been lost on the Foundation. Robert told us that while their first priority is to get the devices finalised and manufactured, they're well aware of the need to create great educational resources.

In the meantime, they're looking towards the enthusiastic community that has grown up around the device, and towards other organisations with similar interests, to fill the gap. They hope that, by allowing the community space to do this kind of work, more interesting and innovative educational materials will emerge - something a bit more exciting than the traditional 'learning Java in a dark room' methodology.

With a bit of luck, Robert hopes that this exciting, collaborative approach to learning and computing might begin to attract a broader constituency to the field - this would certainly be a happy by-product of the Raspberry Pi's core mission, given a number of social imbalances within the technology sector.

That's why they're working with Computing at School to develop an entire user manual and introductory programming course to accompany the device. This organisation describes itself as a 'grass roots working group' that aims to promote the teaching of computing at school. Members of its board include professors, examiners, industry insiders and teachers.

As it stands, this guide will be introducing Scratch, the graphical programming language created by MIT. By all accounts, it's a great language and a fun way to begin computing, that's already used in some schools.

Wider appeal

One thing that Robert emphasised to us, and that he admits they overlooked at the start, was that the device's unique characteristics make it appealing for uses beyond programming education. We have to agree, too: here at LXF towers, many conversations about the Raspberry Pi have ended in us day dreaming about all the uses for such a powerful, yet tiny and cheap, computer!

We took the time to trawl through the internet and find the most exciting Raspberry Pi-based projects to date. Here's our top five:

XBMC

The XBMC developers got their hands on an alpha version of the Raspberry Pi, and put it to good use by getting this first-class media player running.

Everyone loves television. According to Ofcom, we watched an average of three hours and 45 minutes of television a day in 2009! When you take in to account the fact that we also have to work, eat, sleep and wash ourselves, this is an astronomical number.

People's habits are changing, however, as a result of the internet. Services such as the iPlayer are changing how we watch TV, while websites such as YouTube are changing what we watch. In both situations, we've largely been restricted to enjoying these new platforms on our tiny laptop screens, while our once-loved, huge television screens start to gather dust.

What can you do about it? Well, you could make yourself an XBMC system. This excellent piece of software puts a '10-foot user interface' onto your PC, making it perfect for using with your television and remote control.

The interface isn't just big-screen friendly either, since it also comes with a range of beautiful skins, and provides access to almost every popular source of media on the internet.

The problem is, home theatre PCs are often bulky and expensive, and if you opt to use an old desktop PC, you'll probably find that it's too noisy, and the fan will ruin your movies. Step in the Raspberry Pi. It's tiny, cheap, and can play back HD video through HDMI without breaking a sweat.

And you know what? XBMC's developers were one of the projects to receive alpha boards, and they've already got XBMC running on Raspberry Pi.

Pi school

As we said above, getting started with programming and computers depends on more than just a cheap computer - it also needs great, cheap resources to accompany it. We also talked about the great television programs that accompanied the great educational computers of the 1980s, and Robert's desire to see similar, alternative resources created to accompany the Raspberry Pi.

Well, today, we have no need for a huge corporation such as the BBC to get behind such a project: websites such as YouTube mean that anyone can create video tutorials, on any subject, and the whole world can see them. And, already, the enthusiastic community that's appeared around the Raspberry Pi has started to step up and begin creating resources on these websites. In particular, Liam Fraser and Jaseman on the Raspberry Pi forums have really got stuck in.

Liam is the creator of the RasperryPiTutorials YouTube channel, where you can find videos providing a gentle introduction to Linux, and others that cover ongoing programming projects, such as a Snake clone. Once he gets his hands on a device, he plans to video everything he does, so that others can follow along and learn from his experiences.

Jaseman has done things a little differently, and created his series of Python introductions using PNG images, with large, clear labels. Along with the images, he also provides all the example code that he works on, so you can change things and begin to understand how it all works.

Of course, we think that you can't go far wrong with LXF's excellent programming supplement, either.

Hack hardware

The Gertboard is a GPIO extension for the Raspberry Pi; it allows you to turn the Raspberry Pi into a souped-up Arduino. If you read Linux Format regularly, you'll have come across Nick Veitch's Arduino tutorials.

The Arduino and Nick's tutorials are really fantastic. They let anyone get their hands dirty with some simple hardware hacking, but they can also be put to use in far more complicated and involved projects. Fun examples of Arduino uses include plants that tweet when they need water, an ultrasonic range finder to help you park your car, and a talking breathalyser - it can do some pretty cool things.

As exciting as the Arduino is, it doesn't have the power and flexibility of the Raspberry Pi - particularly with regard to graphics and raw processing power. As a result, many people have been excited by the Raspberry Pi's potential as a cheaper, more flexible Arduino.

Initially, prospects didn't look good, since vital functionality was left off the original board. But, thanks to Gert van Loo, another Broadcom employee, and the Raspberry Pi's open nature, there's going to be an expansion board available at launch - the Gertboard. It will provide support for GPIO (General Purpose Input Output), and the ability to connect random pieces of hardware to the Raspberry Pi.

So, if you want to use it to drive a motor, make LEDs blink on and off, operate timer gates or whatever else, the Gertboard has your back.

Along with the Gertboard, there's already a series of GPIO hardware and software tutorials underway, with the aim of introducing you to the basics of hardware hacking. Although the material has been created with the Raspberry Pi in mind, it's also useful for other test platforms, including Arduino and the TI Launchpad, which costs just $4.30.

The Raspberry Pi is tiny, which makes it the perfect device to put inside almost any piece of hardware imaginable.

Inside everything

If you read Graham's Mame arcade tutorial a few issues back, for instance, you may have been inspired to go out and create your own arcade machine. As with many of these projects, the Raspberry Pi is great because it's cheap and small: a $25 machine capable of running all your favourite arcade games - great; a $25 machine that runs cool enough to be embedded in a mini arcade cabinet - awesome!

Since there are ARM packages of Mame already in the Debian repositories, getting it running should require nothing more than an apt-get install. Some intrepid Raspberry Pi forum members have even experimented with taking apart an old NES, without breaking it, and putting the Raspberry Pi inside that. They've plans not only to install an emulator, but to hook it up with wireless PS2 controllers and XBMC for a complete, modern multimedia experience in a super-cool retro case.

Perhaps the coolest proposal yet, however, is to use the Raspberry Pi as the sensor controller on a weather balloon - destination: the edge of space. The forum thread discussing this plan makes for great reading: eroomde, who turns out to have been the president of Cambridge University Spaceflight, reveals that this kind of launch isn't uncommon at all, but they're rarely done with such powerful hardware - as he says: "With all that computational power to play with, just think what awesome things you could do!".

Bramble cluster

One of the coolest ideas in computing is 'clusters'. The idea is pretty simple: you've got a lot of computers, and one very demanding task to carry out; if you could link all those computers together, the task would be finished a lot more quickly.

Usually, combining a lot of cheap, commodity PCs is a more cost-effective way to get this kind of performance than going out and buying a super computer - something only a few organisations can afford.

Now, no one is about to suggest that you'll be able to link enough Raspberry Pis together to make it competitive with clusters built around desktop-class processors, especially with it having only a 100Mbit/s network connection, but that doesn't make a cluster of Raspberry Pis useless.

What a great learning experience, whether in the home or at school, for teenagers, geeks and hobbyists to put together their own cluster. Reading the forum thread where this idea was originally discussed is an educational experience in and of itself: you can find out what hardware requirements are needed for a cluster, what are the limiting factors, and what arrangements will look the neatest.

The same idea could be applied to web servers, too: want to know how load balancing works? Set your Raspberry Pis up as web and database servers, and then manage the load across them. Oh, and it doesn't hurt that Bramble is about the cleverest name for a cluster of Raspberry Pis possible – kudos to Svartalf, the forum member who came up with the title.

Creative cases

The Raspberry Pi is all about encouraging learning and creativity, and how about this for an alternative idea for getting your creative juices flowing?

Raspberry Pis, at least the beta boards, will arrive as bare metal devices. No case, just the circuit board and the connectors. Some people might really like that look, but if you're planning to use your Raspberry Pi in any number of the projects described above, you may want to make it look a little bit nicer (bare circuit boards in a living room definitely aren't to everyone's taste!).

Some suggestions for homemade cases that have emerged so far include a 'fold your own', made with that transparent film used by overhead projectors. These can be printed on to - meaning you could have any design you like on your case, or just keep it fairly transparent - and when bent, they become extremely tough.

Or, if all the eighties and childhood nostalgia has got you thinking fondly back, how about making your Raspberry Pi a case out of Lego blocks? They're available in a wide variety of colours, with all manner of shapes possible - what more could you want?