Raspberry Pi, First 30 minutes

LightCastle - Raspberry Pi
The $35 board that will likely cost you sleepless nights, help you break other hardware, and cost you $400 in additional (awesome) add-ons.

The $35 board that will likely cost you sleepless nights, encourage you to dismantle your spouses favourite hardware, and cost you $400 in additional (awesome) extensions.

Like many people I rushed out and purchased a Raspberry Pi when I heard all the hubub and started seeing the amazing projects come out online.   Then it sat on my desk for 3 weeks.  Then it got moved to my backback and I carried it around for another three weeks …  and it was about to go into my “never to be completed” box-o-stuff.  To be honest, it’s actually a “basement-o-stuff”, and walking through it is to walk through my museum of lost hopes and broken dreams.

But not this time.  No sir.  My good friends Riley Chandler and Josh Brown sat down with me last night, we got my first Rasbian SD disk burned and I booted up my Pi for the first time.  Then we played some Python games and I had a blast!

Here is, start to finish, my recipe for getting the raspberry pi up and running.  Along with some tips I learned as I fumbled around last night:

Step 1:  Shopping List

To Digress ... Riley showed me this awesome piece of equipement.  A USB keyboard that works great for his XBMC build.

To digress … Riley showed me this awesome piece of equipment. A USB keyboard that works great for his XBMC build.

I went to Staples.  Which is neither financially prudent nor does it get you the coolest stuff.   I should get stuff on line, but then I spend way too much money on things I don’t need – vis-à-vis the image to the right.

  1. Wireless Keyboard and mouse (Didn’t end up using them, used wife’s instead, cost me $40)
  2. SanDisk SDHC Card (8 gb) $8.99  — I forgave it for advertiseing that it is  Waterproof, because it was cheep, and it clearly indicated a speed rating of 4, which is what the Pi calls for.
  3. Surge Protector w/ 2 USB Charging Ports (19.99) – Need some extra ports anyway, and this fit the bill with a 5v/1A usb port rating.

Step 2: Download Raspian

I downloaded Raspian from the Downlaod center of the Rasberry Pi.  Not only is this THE recommended distro, but it’s also debian based, so I don’t have to think hard about packages etc… my having grown up on debian based systems.

I unzipped the download, which netted me a disk image:
2013-02-09-wheezy-raspbian.img

Step 3: Write the Raspian Disk to my SD Card

This bit of advice – how to quickly write to the SD card from a linux distribution is out there a bunch of places.  I found this page particularly helpful: http://www.embeddedarm.com/support/faqs.php?item=10

My linux laptop has an SD Card slot, and is running Ubuntu 13.04.

  1. Insert your SD Card.
  2. run fdisk
    > dan@ook:~/Downloads$ fdisk -l
    Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
    81 heads, 10 sectors/track, 19165 cylinders, total 15523840 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
            Device Boot      Start         End      Blocks   Id  System
    /dev/mmcblk0p1            8192    15523839     7757824    b  W95 FAT32
  3. From this delightfully arcane bit of output I deduced that my device is located at /dev/mmcblk0  – the “p1” is the partition, and I don’t want to write inside the parition.  I want to write over the full drive.
  4. I run the dd command (a convert and copy command)
    > dan@ook:~/Downloads$ sudo dd if=/home/dan/Downloads/2013-02-09-wheezy-raspbian.img of=/dev/mmcblk0
  5. I become patient, cat like, an embodiment of the Zen Buddha, as I wait patiently for the quiet minded dd command to finish.  It took a while.  Minutes crawled by, nothing output, was it hung?!?!  No.
  6. This is the face of the dd command.

    This is the face of the dd command. Notice the disdain and anger in it’s eyes for my lack of competence.

    I skipped Step 6, went to Step 7and watched as my Raspberry Pi, also not one for over communication, stared plaintively back at me with one red light.  I then googled and re-ran the dd command about 15 times, each time risking doing something horrific to my other drives, till I realized what I’ve already told you in step 3.  So, for you, there is no Step 6.

  7. I put the SD Card into my Raspberry Pi, and hooked all my other components up (monitor, keyboard, sound, power supply, etc…)  And booted it up.  Following the excellent instructions provided by the Rasberry Pi getting started guide.
  8. I watched delighted as a giant Rasberry showed up on my monitor.  I danced.  I drank beer.
  9. I drank beer.
  10. I drank beer and googled around for how to now break my Rasberry Pi in some new and unique fashion.  I then spent $45 on a kickstarter project for the BrickPi.

After that Riley showed me his XMBC Rasperry Pi.  And we and our kids watched some Despicable Me in HD on our projector.  It was delightful.

I’m hoping to get some additional components this weekend and perhaps take apart our remote door bell and see if I can’t connect the two in some way so that we get a message in our Campfire Chat room when someone rings the doorbell at our office while we are still sitting around in our underwear at home.    Once I get that done, I’ll post that as well.