A slice of Raspberry Pi

So starts the next leg of my journey to become platform agnostic. After using a Mac as my primary system for the last year or so (albeit only doing a modest amount of Mac-specific coding, for now, and almost always having a Windows session alive inside Parallels Desktop), I now have my first Linux system, in the form of an incredibly cool Raspberry Pi device.

PC, Mac and Linux

This is nearly the first time I've touched command-shell Unix since graduating from University – I've opened a Terminal window a few times to do something trivial on OS X – but I'm happy to note I've managed to remember a fair bit (although I doubt I'll ever re-learn the vi shortcuts I used to know :-S).

It actually feels really good to be working so close to the metal again – I've missed the feeling of connecting with the OS and hardware at such a low level. I'm really having so much fun with this technology. 🙂

And it was really very easy to get the device up and running, at least initially: I plugged in a keyboard via USB, a screen via HDMI and an RJ45 LAN cable, and then inserted an SD card containing the OS. To turn it on I simply plugged in a micro-USB phone charger for power, and it booted up right away.

Raspberry Pi layout

[Diagram by Paul Beech]

Over the last day or so, I have:

  • Burned a build of Raspbian "wheezy" (a Debian variant) onto a 2GB SD card using Win32DiskImager
  • Booted the Raspberry Pi from it – which, as noted above, worked perfectly first time
  • Installed various secondary components using the excellent apt-get (Debian's equivalent of NuGet, which was almost certainly influenced by it)
  • Discovered I needed more space when downloading OpenCV
  • Saved my 2GB OS installation back to my PC – again using Win32DiskImager – and used it to write the enhanced OS image to a 4GB SD card
  • Expanded the OS partition to fill the 4GB SD card
  • Downloaded, extracted, built and installed OpenCV (by far the most time-consuming part)
  • Ran various OpenCV samples, to see them in action on the Pi

I'm having some trouble building/running an OpenCV face detection implementation, but I suspect that's just through my ignorance.

To help with accessing and managing the device, I also performed some additional tasks:

While waiting for help getting face detection via OpenCV working, I decided to "simply" attempt to get motion detection working, instead.

So far I've managed to get a few stills out of the webcam, with differing lighting conditions:

First thing this morningNot long afterwards

Now I want to get Motion working properly and then connect it with this Google Drive uploader/emailer script. Eventually I'll manage to get OpenCV to process some frames and detect faces, but probably not today. 🙂

6 responses to “A slice of Raspberry Pi”

  1. Scott McFarlane Avatar

    Just so you know, I still want your job.

  2. 🙂

  3. I thought you'd like to know that the settings on the uvccapture page you linked to give some pretty atrocious results..

    this script from here seems to work better:

    #!/bin/sh
    cd /home/pi/uvccapture/output
    uvccapture -v -S45 -B190 -C35 -G50 -x640 -y480 -osnap.jpg
    sleep 5
    uvccapture -v -S45 -B190 -C35 -G50 -x640 -y480 -osnap.jpg

    🙂

  4. Thanks, Alex - good to know.

    I was personally less worried about the quality of the results - just the fact the webcam actually worked. 🙂

    I'm using Motion for the actual capture, on my side.

    But yes - I'm sure this info will prove very helpful for me, at some point.

    Kean

  5. I find it rather unlikely that apt-get was inspired by NuGet, since it predates it by at least two years. Rather, package management in Linux goes back to at least 1994, when dpkg was released. RedHat's RPM came out in 1997. NuGet, on the other hand, has an initial release of 2010 (according to the Wikipedia page you linked, anyway.)

  6. Exactly. You read my comment backwards.

    Kean

Leave a Reply to AlexFielder Cancel reply

Your email address will not be published. Required fields are marked *