I received delivery of my Raspberry Pi computer from RS components about two and a half months ago. It's taken a bit of time to finally 'get it together' to create a setup that enables me to learn more about what it can do and what I could potentially use it for. This blog is all about the steps that I took to arrive at a working setup.
When I made my original order I decided on the lazy option - I chose to buy a number of key components at the same time. Along with my Raspberry Pi board I bought a power supply (which connects to the micro USB port of the device), a HDMI cable and a memory card which contains an operating system. When you're starting with something new, there's something to be said for going with a standard distribution or setup. There's the fundamental question of 'will it do stuff when I turn the power on?' Going with a default or standard setup is a way to get going quickly.
There were, of course, three other things I needed: a mouse, a keyboard and a screen. For the screen I figured out that I might be able to test my Pi out using my TV (since it had a HDMI port). For a keyboard and mouse, I visited a popular on-line hardware retailer and bought a cheap mouse and a keyboard. (To get an idea of how cheap they were, both items together cheaper than the price of a single pint of beer; it's astonishing how the price of hardware continues to drop).
I wanted something else, though. A quick search on eBay using the term 'Raspberry Pi' revealed a number of small companies that had started to make cases for the Pi. After about ten minutes of searching I found a company called ModMyPi. Although I didn't strictly need a case, I thought it would be a sensible thing to do. I could easily imagine myself putting my Pi on the floor and haplessly treading on it whilst carrying a hot cup of tea.
After ten minutes of agonising decision making I had finally decided that my Pi needed a red case. Why red? Well, for two reasons: firstly, to signify that this little box is important (i.e. the red box is where number crunching takes place), and secondly, to make it pretty visible when it's sitting on my beige carpet (so I don't tread on it).
The trouble with buying something new is that things don't always arrive on time, and this was the situation with my tiny Pi case. Although I soon had my keyboard and mouse, the case took quite a few weeks to arrive due (apparently because I didn't read the small print which said that I was making a pre-order - note to self: read the small print!)
Boot day 1 : Trouble
I had everything: my newly suited (or encased) Raspberry Pi, a power supply, a USB keyboard, a USB mouse, a HDMI cable and an operating system (a version of Linux) on a memory card. I attached the USB devices, connected the Pi to my temporary display (my living room telly) and powered everything up. Through the case I could see that a LED came on and my TV changed display mode - things were happening! The screen started to fill with boot messages and then suddenly... everything stopped. I squinted, looked at the screen and I could see that there had been something called a Kernal Panic.
When faced with weird technical stuff going wrong what I tend to do is check all the connections and try again. Exactly the same thing happened, so I powered down, and scratched my head. Then, I unplugged the USB device and the USB keyboard and powered up; this time I got a lot further. I was eventually presented with a Linux login prompt but did not have any way of entering a user id. This told me that (perhaps) there might have been something wrong with either the mouse of the keyboard. I plugged both devices, one at a time, into my Windows laptop to see if they were recognised. The mouse was recognised straight away but Windows had to search for an eternity to find a device driver before the device was recognised, suggesting that there was something special about its design.
Every techie knows that Google is their friend, especially when it comes to weird error messages. I searched for the terms, 'raspberry pi', 'panic' (or dump) and 'keyboard' and quickly found a site called elinux.org that contained a Wiki page which listed keyboards that were known to cause mischief. I soon figured out that I had ordered the Xenta HK-6106 which was known to cause a kernel panic on a Debian distribution (I obviously had either the same one or a distribution very similar to it). Mystery solved!
Ordering more stuff
I ordered a new keyboard. This time I bought one (which cost the price of a half pint of beer) that was on the 'working peripherals' list.
One of my biggest worries (if you could call it that) is that the screens that I use for my desktop PC are both pretty old (I have a dual screen setup). One of them only has a VGA input, which is useless for the Pi. The other screen has a DVI input. A quick search revealed that it was possible to get HDMI to DVI cables. I didn't know you could do this, and I have to confess that I don't know much about DVI other than my main PC has got one of these as a video output (in addition to a VGA port). Still, I decided to buy a cable from eBay and hope for the best.
Boot day 2 : Success
After rummaging in a box that contained an indeterminate number of cables (hasn't every geek got one of these boxes?), I found a network cable. I took every bit of my Pi setup upstairs to my study area and connected everything together; keyboard, mouse, power supply, screen and network cable (which I physically connected to the back of my router, after dragging it half way across the room since my network cable wasn't quite long enough, and still isn't quite long enough).
I powered up. A kernel panic didn't occur. I was presented with a login prompt. I typed the user id: pi, followed by the password: raspberry. I then entered 'startx' at the shell prompt. The screen changed and I was presented with a gui. My aged screen was working! I soon discovered an internet browser (accessed through the menu located at the bottom left of the screen). Within a minute or so I was able to navigate to my favourite news site and open Wikipedia. Success!
Now that I've got everything working, I asked the question, 'what can I do with it?' I guess this question has two key answers: you can use it to learn about computing, or you could use it to do stuff. If I find the time I hope to do both!
Learning with the Pi
Considering the learning aspect, it's obvious that there are loads of things going on from the moment that you turn on the Pi. There are a couple of pages of screens of mysterious messages which currently don't make much sense to me (it's been a while since I've had a Linux distribution on one of my computers). When you login to the Pi environment there are loads of menu items, applications and tools that I've never heard of before. There's also a version of a windowing system that I've never heard of before. There's also a weird sounding browser which seems to render things pretty well, judging from a brief ten minute play.
There are also a set of programming tools and utilities. The learning can go from the low levels of computing (from the level of the operating system) through to higher level applications (that can help to teach fundamentals of programming). Being a bit of a geek, the most interesting question for me is 'what exactly does the Pi Linux distribution contain?' This, I think, is going to be my first learning task.
Another geeky question is: how do you build software for the Pi? My main computers are Intel based desktops or laptops. The Pi is based around an ARM processor. How do I take existing Open Source software and compile them up so they work on that ARM chip? Going down a level even further, how do you get USB peripherals to work with the Pi? Do I have to write a device driver? Is the world of ARM device drivers different to Intel device drivers? I have so many questions!
One thing that I have heard of (in passing, through a quick Google search) is that you can use what is known as a cross compiler. This means that you can compile software using one processor architecture for another. Of course, this is getting impossibly deeply technical for a first blog about the Pi so I'm going to stop asking myself difficult questions and wondering (for now) what is and what is not possible!
On another note there are a couple of Open University modules that are tangentially connected to (or might be useful with regards to) the Pi. The Pi Linux distribution contains an environment called Scratch. This is a graphical programming language developed by MIT that introduces the fundamentals of computer programming. The Open University makes use of a derivative of Scratch called Sense, which is used with the TU100 My Digital Life module. The other module that could be useful is T155 Linux: an introduction.
Doing stuff with the Pi
So, it boots up. That's pretty cool. But what might I practically be able to do with it? I've heard one of my colleagues talking about potentially using a Pi to create a digital video recorder, which sounds like a fun project. You can also use it as an embedded system to control other hardware. In fact, looking at the Raspberry Pi blog presents a veritable array of different projects and ideas.
About six or so years ago, perhaps even longer, when I worked in industry, in a company that made educational products that could be used to help teach engineering subjects, I suggested creating a device that could (potentially) be used to help teach the fundamentals of computer networking. The idea was to make use of an inexpensive embedded microcontroller to create something called a 'computer cube'. Each cube would have simple input and output (perhaps a couple of switches and a LCD display), as well as a network connection (either a standard network connection, or a proprietary interface that can be easily accessed through software). The idea was that you could connect a set of computer cubes them together on a desk; you could create your own mini internet and also have the ability to look at the signals transmitted between devices and begin to understand the principles of protocols.
Of course, such an idea was hopelessly ambitious, plus there were increasing numbers of network simulators that did a pretty good job of helping learners to explore the principles of networking. Fundamentally, at the time, it was a bad idea.
But then the Pi arrived. The Pi is cheap, small, has its own peripherals and is open. You can run whatever software you want on it. A Pi is a web client, but there is no reason why it can't also become a web server. A Pi could also (potentially) become everything in between too. You could connect them together using relatively cheap switches and hubs, and explore (in a practical sense) computer networking and the software that supports networking works. You could set one to transmit data, and perhaps use the general purpose IO ports to indicate output of some kind.
Would it be possible to have a network of Pi devices on a desk? Possibly. What software would be useful to learn more about the fundamentals of networking? I'm not sure. Could we create some useful curriculum or pedagogic materials to go with this? I've no idea. All this sounds like a project that is a bit too big for just one person. If you accidentally discover this blog post and you think this may be a useful idea (or hold the view that it remains a bad idea), then please do get in touch!
There is one clear certainty in computing. It isn't Moore's Law. It's that there is always an opportunity to learn new stuff. As well as looking at the Pi operating system and learning about what the various bits are, I've also heard it mentioned that the language of the Pi is Python (Wikipedia). This isn't a language that I've used before. It's certainly about time that I knew something about it!
If you scratch the surface of anything technical you find a set of subjects and technologies that are both interesting and challenging. Not only is the Raspberry Pi device interesting and challenging in its own right, but I'm sure that the situations in which it can be used and applied will be interesting and challenging too.