Skip to main content

I’ve got Pi(3) brain



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, spinal discs, brake discs, etc.  Here, we will be using a SDHC card.  It will perhaps become the most important part of Rosie's brain - because it will be used to store everything (data).  We can replace the Pi.  But if we lose the SDHC card, we lose months - maybe years - of Rosie's precious memory.

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.

Even more reading:

Raspberry Pi Foundation's official instructions on how to get started can be found below:

https://www.raspberrypi.org/learning/software-guide/quickstart/

Comments

Popular posts from this blog

Tea minus 30

We're fast approaching Christmas time.  And if robots were to make one simple observation about the human species during the Christmas festivities, it's that they watch a lot of TV.  A LOT.  Often, accompanied by an inappropriate amount of greenhouse gas-producing food.  Stuff you don't normally eat during the remainder of the year - for good reason.

And most so-called shows on TV are boring to robots like Rosie.  After all, why watch a minor subspecies of the human race - celebrities - stumble awkwardly around the dance floor, dressed like a faulty, sparking circuit board?  Such branch of entertainment doesn't require robots to engage any of their proud circuitry.  Their processors remain idle.  Memory under-utilised.

But if robots are to be part of people's homes (and blend in), they need to look at least a little interested in some of this irrational nonsense.  Nobody likes a party pooper.  A killjoy.  And this is where a certain subgenre of TV entertainment co…

Beam me up, Rosie!

How do you get from A to B?

You can't, as As and Bs are just letters in the alphabet. But if A is your house, and B is a meerkat village at your favourite safari park, you'd probably use a device equipped with GPS.  Not to be confused with UPS, who will deliver you your chosen meerkat through the post. And why on Earth would Rosie Patrol need one? Precisely, it's because she is on Earth that she needs one. Because our planet is rather big. Big enough to get lost in. And we don't want to lose our friendly plastic boxes on wheels. And maybe, eventually when she's clever enough, she'll go and defeat baddies on her own. And return home afterwards for a well deserved Earl Grey tea.

Besides, why wouldn't we want to add another three letter acronym to Rosie Patrol's repertoire?
All superheroes need:One Raspberry Pi 3, running Raspbian OSComputer from which you are connecting to the Raspberry Pi Probably the most important bit: a GPS receiver thingmy. …

Raspberry bye, hello

Let us make this very clear from the onset of this exotic excursion.

This is not a case of Raspberry Bye. Our relationship with our favourite single-board computer hasn't at all soured. In fact, we've become wholly inseparable. There's been many months of undeniable fun that's been had with the venerable computer strangely named after an edible fruit. To the extent that our relationship requires a healthy break. And quite frankly, our Pis require a well earned summer holiday to do whatever it is that robots and computers do during their time off. Crash. Burn. Refuel (with questionable toxins). Not at all unlike their human counterparts. And ultimately, it would be nice if they could return to a brand new, adorable pet waiting for them at home, a likeable little companion that they can just get along with.

Well, we visited a pet shop, but couldn't find anything as small and smart as this adorable pup we stumbled up on while searching the Internet for a new, miniat…