Do robots think? Do they have emotions? …Do they prefer broccoli or asparagus?
Time to find out; and let’s start by giving Rosie a brain. A (Raspberry) Pi brain.
Brains need to make sense of all the information that it receives, and do something useful with it. It also needs to be able to memorise useless stuff, like Christmas cracker jokes to keep humans amused.
As we aren’t yet able to buy actual human brains from Amazon, we have decided to purchase a Raspberry Pi 3 instead. It has a quad-core ARM processor to do the processing. It has 1GB of RAM and an optional SDHC card to do the memorising (I think as I can’t quite remember). And it has seven million other letters worth of acronyms to do what robot brains should do. Observe the world. Be smart (sometimes). But most importantly, impress humans with silly robot dancing.
You will need to have these:
- Computer (we are using a Windows 10 laptop). Apples are fine too (of the computer variety, not the fruit), you will just need to use different software to write the Raspbian OS image to the SDHC card.
- Raspberry Pi 3, with power supply
- Micro SDHC card
- SDHC card reader (many new laptops have these built-in). But you may need an adapter for a 'micro' SDHC card, especially if your computer only has a slot for a larger card.
- USB keyboard and mouse
- Monitor (with HDMI connection), and a HDMI cable
You will need to do this:
- Install software that allows you to write image files to SDHC cards. We used Win32DiskImager (https://sourceforge.net/projects/win32diskimager/). Then, insert the blank SDHC card into your computer (not the Pi!).
- Download the official Raspbian Operating System (OS) image file from here. We used the '2017-07-05 Jessie' version. Newer versions may be available.
- Write the Raspbian OS image onto the SDHC card using the SDHC card writer software
- Remove SDHC card and insert into the Raspberry Pi
- Connect a USB keyboard, mouse and monitor. Power up the Pi.
- Have a look around 'the brain'
What do you get after all this?Our Raspberry Pi will run the 'Raspbian' Operating System (OS). Mainly because it is Raspberry Pi Foundation’s official supported Operating System, and we aren't particularly imaginative. Did we also say it's free?
An Operating System (often called OS for short) is a piece of software that is most often installed on computers first to allow us to interact with the computer's hardware. You probably would have heard of Windows, Android or iOS, amongst many others. Raspbian is just another one of those, and is based on Linux, which is a very popular type of operating system. Also, OSs need storage to run on as they consist of a bunch of files. Most run on disks: hard disks, USB disks,
Going forwards, our Raspbian OS will be the nerve centre from which we make everything happen. Create code. Install drivers and programs. Create more code. That's why you better get used to it... it will be both your best friend and your worst enemy.
This is simply too much detail:You will need a SDHC card. First and foremost, it will be used to store the Operating System, from which the Pi can boot up and do its clever stuff. Pi 3 requires a 'micro' SDHC card. 8 or 16GB seems to be an appropriate size for Rosie's brain. Of course, we don't want her to have too big a brain - otherwise she might just get too geeky (and take over the world).
Firstly, you will need to insert the SDHC card into your computer so that you can write the Raspbian OS image file to it.
Download and install a program that allows you to write image files to SDHC cards. We used Win32DiskImager (https://sourceforge.net/projects/win32diskimager/) but other tools are available (or so Google reliably tells us). Then, download the official Raspbian OS image file from here and write the file to the SDHC card.
Once your chosen program helpfully informs you that it has finished writing the file, carry out the brain implant. Remove the SDHC card from the computer and insert it into the SDHC card slot of the Pi. It is a good time to connect the power cable as well (but don't connect it to the mains just yet).
Insert your USB keyboard, mouse and monitor (using a HDMI cable) into your Pi. You'll need these to instruct Rosie what to do. Until we make her accessible remotely of course. She won't recognise your frantic hand gestures or your shouting - not just yet.
Now, you're all set for the magic moment. It's like that moment when someone walks into the room with candles lit on your birthday cake - and hopefully not like when it is accidentally dropped and sets fire to the carpet.
We are powering on Rosie's brain.
Connect the other end of the power cable to the mains, and watch the Pi (and its Raspbian OS) come to life before your very eyes. You will eventually see the Raspbian desktop appear in your monitor. In this version, there's a random road, some clouds, maybe even a sun in the horizon but we're not quite sure.
Isn't this cool?
But that's not how serious roboticists (if that is actually a word) rock and roll. Like in science fiction movies, they demand that ineligible texts scroll rapidly across a black screen. Time to say goodbye to the pretty desktop. We're taking this party to another level. Things have just become serious. It's time... for the command line prompt. Or terminal as it's confusingly called.
Click on the terminal prompt icon in the top left. A scary black box will appear, instantly making the experience more bleak.
Now, Rosie's brain will take you seriously. She's awaiting your instructions.
Run a few (totally uninteresting) Linux commands to navigate around the contents of Rosie's brain. Let's also create a folder called 'rosie'. Why? Well, where else would we want to store Rosie's secrets going forwards?
Here are a few of the many Linux commands available that you'll type in (always with the 'enter' key pressed after each command):
pwd...shows current directory (folder)
ls...shows what's in current directory
mkdir rosie...creates a new folder in current directory called 'rosie'
ls...shows what's in current directory (again). Only this time, you should see the 'rosie' folder.
cd rosie...navigate 'into' newly created 'rosie' folder
pwd...remember this command? It checks that our current directory is now 'rosie'.
All in all, you should see something like this:
Now store away these commands (and many more that will follow) in YOUR brain. They are beyond just useful. They are essential when navigating around Rosie's brain (which of course by now you know is a Linux-based Operating System, running on the Pi's SDHC card).
And believe it or not, this is it. No more, no less. Rosie's brain is fully operational.
Update 1 - March 2020There is now a handy Raspberry Pi Imager that allows us to install the operating system directly onto the SD card. Give it a go, why don't you?
Even more reading:Raspberry Pi Foundation's official instructions on how to get started can be found below: