Building a robot at the NASA Space Apps Challenge

Claudia our Space Apps Lego robot

The NASA Space Apps Challenge took place around the world on 20-21 April 2013. Suitably inspired by this global hackathon, I entered the challenge with a team of work mates. We decided to take on the Lego Rover challenge and set about creating a Lego robot with a difference – gesture control. We assembled a Lego Mindstorms NXT robot kit and hooked it up to a laptop PC with a Microsoft Kinect sensor. In a handful of hours we created “Claudia”, the gesture-controlled robot that can use her claw to collect garbage (in this case soft drink cans) – somewhat inspired by and resemblant of WALL-E.

It was great fun and we were delighted (and relieved) that our live on-stage demo worked. Thanks to Steve for his successful arm-waving!

Only where I live

Avid readers of my blog will know that I dislike silly signs. The worst offenders I celebrate here and then do my best to ignore. However, this week the issue of silly signs was brought so close to home that it really must not be ignored. One lift in my apartment block now bears this sign inside and out:

Don't go it alone - this lift demands "3 Persons Only"

Don’t go it alone – this lift demands “3 Persons Only”

In the past, I have regularly travelled as sole occupant of that lift; a practice which the new sign seemingly outlaws. Thankfully, this morning I reached the lift at the same time as two other residents. The three of us descended to the ground floor together, safe in the knowledge that we were compliant with the “3 Persons Only” order. But why the order? Let me speculate:

  1. It’s a sociable new scheme to encourage standoffish London neighbours to interact
  2. It’s a way of reducing power consumption, since batching people into threes reduces the number of journeys the lift needs to make
  3. It’s an attempt to make sure you’ll never be trapped in the unreliable lift alone; you’ll always have two other ‘strandees’ to swap stories with
  4. It’s an attempt to make the unreliable lift more reliable, by reducing the advertised capacity from 4 persons max to 3 persons only
  5. It’s an attempt to ban all non-human users. Dogs, aliens: think again!

Whilst ideas #1, #2 and #3 may have real merit (not so much #5), I’m fairly sure that the intention was #4. I’m also fairly sure that there was no intention to prohibit individuals or couples from using the lift. So, again we find that pesky word “only” messing up the meaning and creating a silly sign. What to do instead?

  • Better would be a sign stating: 3 Persons Max.¹
  • Funnier would be some comedy weight limit guidance
  • Better still would be an upgraded lift that measured the weight of its occupants and refused to operate in cases when its safe limit was exceeded. That way there would be no need for a sign, because the only possible behaviour would be the desired behaviour.

Maybe I’ve been reading too much of Donald Norman’s writing on design, but I’m now on a mission to get this put right. I suspect the lift upgrade may be beyond reach, but rewording the sign seems a sensible target.

UPDATE 10/2/2013: I should clarify that the new sign within the lift has been fixed on top of and obscures the original plate showing the lift’s rated load (in kilograms) and passenger capacity. I’ve found that the Lift Regulations 1997 (summarised here) have very clear guidance on this matter:

“each carrier must bear an easily visible plate clearly showing the rated load in kilograms and the maximum number of passengers allowed”

The lift was previously compliant with that provision, but the modification of the rating plate has rendered the lift non-compliant. I suspect that whoever chose to install the new rating plate will wish to revisit their decision, because (reading further in the regulations) I note that:

“It is an offence to supply lifts or safety components which do not comply with the requirements of the Regulations. Any person committing an offence is liable, under summary conviction, to imprisonment, a fine or both.”

So, what started as a bit of ungrammatical amusement seems to have uncovered a serious safety issue which I feel duty bound to raise with the building manager. I suspect the “3 Persons Only” sign will not be long for this world.

UPDATE 10/4/2013: Success! The sign in the lift has been removed (so the original rating plate is visible again) and the sign outside the lift has been replaced with one saying “3 Persons Max”.


¹ Obviously, this wording might be problematic for people with the name “Max”, but I suspect they’ve learned to live with (and perhaps even relish) the ambiguity.

Geek art homage: BloodhoundSSC & Raspberry Pi

At an IET talk on Raspberry Pi this week, I met someone who works on BloodhoundSSC – the awe-inspiring, faster-than-a-bullet, 1,000mph car project. Both Raspberry Pi and BloodhoundSSC are fantastic UK STEM education initiatives doing a great job of engaging geeks of all ages.  Suitably inspired, I couldn’t resist paying homage with my Pi-powered light painting gizmo. Here’s the resulting living room geek art that celebrates these two UK technology icons. Hope you like!?

Long exposure light painting showing BloodhoundSSC car on left and Raspberry Pi logo on right

Geek art homage to BloodhoundSSC and Raspberry Pi

Robotic light painting with Raspberry Pi

First handheld attempt at light painting with Raspberry Pi

Inspired by the amazing images and brilliant write-up by Phillip Burgess at Adafruit, I decided to give my Raspberry Pi something interesting and colourful to do – light painting. A happy day of geeking saw my brother and I pull together a wireless remote-controlled, battery-powered, Raspberry Pi light painting robot. It’s not perfect, but we think the initial results are pretty good for a day’s work and I thought I’d share some notes and photos in case anyone else is interested.

A few days earlier I had downloaded the PDF guide from Adafruit and used it to work out a kit list for mail order (LED strip, connectors, Raspberry Pi GPIO cable etc). I already knew I could run my Raspberry Pi from a USB battery and figured I could keep things simple by powering the Pi and LED strip from the same battery (the two-port Tecknet iEP387 battery is fantastic). The Edimax Wi-Fi dongle in the Pi would also let me control it without wires (although admittedly within the confines of my home wireless network to start with). After downloading/installing the Occidentalis operating system image for the Pi and setting up Wi-Fi, we had a battery-powered Pi which we could administer from my Windows laptop using PuTTY (for terminal sessions using SSH) and WinSCP (to copy files to/from the Pi). It was then easy to copy across and run the Python script that does the magic of converting image files into “RGB slices” and sending the necessary control signals to the Raspberry Pi GPIO ports to drive the LED strip.

For the LEDs, we soldered a 4-pin JST connector onto the input side of the LED strip as shown in the Adafruit guide (only we mixed up the yellow and green wires, which caused a bit of confusion until we figured that out). On the opposite side of the JST connector, we connected the red and black power wires to a standard USB A plug (via a cannibalised mobile phone charging connector) and the green (data) and yellow (clock) wires into the Raspberry Pi GPIO connector via jumper leads.

Test time! I used GIMP to create a 32-pixel high image – the word “Finventing” in white on a black background (with an extra 1-pixel black column on the right so that the light painting “ended” with all LEDs off) . Here’s the image I created and copied over to the Pi:



After diagnosing and solving the misplaced green vs yellow leads, we ran the script (sudo python and saw the LEDs flash into life. Keen to try out light painting, I grabbed my digital SLR camera, stuck it on a tripod, set it to Manual mode on a 5-ish second exposure with a 2-second delayed shutter release (to let me get into position before the shutter opened). I timed the shutter press to anticipate the start of the sequence and walked across the living room holding the Raspberry Pi and battery pack at shoulder height with the LED strip hanging down. It worked better than expected. You’ve seen the result above at the start of this post.

Excited by this progress, we raced to get get a robot doing the painting before my brother had to catch his last train home. To get our robot platform up and running, we assembled the DFRobot “Pirate” kit and lashed up a remote control system for it, reusing stuff from previous projects (an E-Sky ET6 001726 remote control transmitter and EK2-0246 receiver connected to a Pololu TReX Jr motor controller). This did the job, provided we orientated  the transmitter 90 degrees clockwise (so that the robot direction and control stick direction were aligned) – good enough for a first attempt.

The remote-controlled light painting robot. J suggests we call it “Glo-Rida”.

But how to mount the LED strip vertically from the robot? Although it’s quite light, the strip is a full metre tall and nothing to hand would obviously do the job of a mast. After much head scratching, we settled on cannibalising a telescopic antenna from an old remote control toy and extended it further by attaching a length of coat hanger using electrical terminal connector block. We lashed on a couple of guy ropes made of string to help brace the mast, tidied the battery and Raspberry Pi into the robot chassis and we were ready to try painting.

Check out my glowing 1-metre high mast

But what to paint?

“Let’s do Pac-Man” said my brother, so a Google Images search found this classic Pac-Man image (resized to 32-pixels tall):



With bro on robot remote control duty and me acting as photographer, we set about overlaying the living room with a ghostly Pac Man image. Here’s how it turned out:

Yay! Pac-Man takes over the living room.

Pretty cool I reckon! In hindsight the ghosts are upside down, but for next time we could simply flip the image (or adjust the Python script) to solve that. For a one-day project we were happy enough.

I’m so taken with this concept I’m looking forward to doing more of this stuff. Key changes planned for the future:

  1. Get the robot running faster in a straight line. It’s currently able to go in a straight line at slow speeds, but goes squint at higher speeds.
  2. Link motion control with image display control and possibly image capture (currently they’re all independent and require manual synchronisation).
  3. Establish an out-of-home control approach for Raspberry Pi, so that I can do light painting “on location” at London landmarks (might involve using my phone as portable a Wi-Fi hot spot).
  4. Create a web interface for the Pi (to select the image, choose orientation/direction/speed, turn LED display on and off and shutdown the Pi safely once finished – feels weird issuing the text command “sudo shutdown -h now” to a robot!). Possibly use a web interface to control the robot motion too.

Hope this stuff is of interest to people. Did this help or inspire you? Have you done other cool light painting or robotics stuff? I’d love to hear from you in the comments.

Apple Maps fails simple London postcode search

This morning, Apple Maps let me down badly on my way to a meeting. All I needed to do was look up a London postcode and find the nearest tube station. Simple. It’s something I’ve done many times using the Google-powered Maps app on my iPhone. But for Apple Maps (which replaced Google Maps in Apple’s recent iOS 6 update), this simple request was too much to ask.

Thankfully Google Maps came to the rescue (via web browser). Have a look at the screenshots below and witness the Apple Maps shambles.

How it should be – Google Maps clearly showed three named tube stations, with Tottenham Court Road closest to the pin (showing the result of my postcode search). Result.

Apple Maps identified the WRONG LOCATION for the postcode, the MAP FAILED TO LOAD FULLY and NO STATIONS WERE SHOWN.

After zooming and repositioning the map, it loaded fully and two of the three stations were displayed (without names) but THE CLOSEST STATION WAS MISSING. I struggle to imagine a poorer user experience. And it’s only by comparing to other maps that the poor data quality is apparent.

Apple has conceded that there are issues with Apple Maps, but its advice is to use other map applications as a workaround. Apple and workaround should not belong in the same sentence. Until they have a superior offering, they should reinstate Google Maps – eating humble pie with Google if necessary.

To me, the Apple brand used to mean “fantastic experience, worth the price”. Now Apple seems to care more about competing with Google than providing the best user experience for its customers. That’s not a philosophy I support. That’s the reason my long-awaited iPhone 5 is languishing unopened in its box and I have more inclination to send it back than to open it. If Apple announces iOS 6.1 with reinstatement of Google Maps, that might just restore my faith.

Update (6 Oct 2012): I’ve called Orange and cancelled my new contract. The iPhone 5 is being sent back unopened. Just need to work out how to remove iOS 6 from my trusty iPhone 3GS and revert back to iOS 5.1.1 with Google Maps and its beautiful integration with Contacts and Calendar. Orange put me through to a chap at Apple Support, who agreed that Apple Maps is bad but couldn’t help downgrade my phone. Best chance seems to be obtaining a different 3GS handset that hasn’t been upgraded and then restoring my data from a backup. When I bought the 3GS the Apple website claimed “Maps on iPhone combines everything you love about Google Maps with the accuracy of GPS and a built-in digital compass”. So the device I contracted with Orange for no longer lives up to the claims. Wonder if I can talk them into swapping my handset for one that’s still on iOS 5?!? What a load of faff to get back to maps that “just work”…

Use QR codes to let friends use your home Wi-Fi easily

Create a "cheat sheet" like this to let friends access your Wi-Fi easily

When friends come to visit, it’s increasingly handy to let them connect their smartphones and tablets to your Wi-Fi network.  Whether they want to share amusing YouTube clips, download the latest and greatest apps/games you’ve been discussing or just access web and email, Wi-Fi usually makes it quicker than relying on the mobile phone network. There’s another benefit if they’ve got an iPhone/iPad and your house has an Apple TV as part of your audio/video setup. By connecting their Apple gadget to your network, they can beam their choice of music, videos or photos to your TV/hifi wirelessly using AirPlay. It’s really simple and makes media sharing much more immersive than passing someone’s iPhone or iPad around.

But there’s a problem. If you’ve secured your home Wi-Fi network, it’s protected with a strong password that needs to be entered on every device that connects to the network. The longer and more complex the password, the harder it is to type in on an iPhone/iPad. Wouldn’t it be great if there was a way of entering the password without having to type it in?  There is: QR codes. We used them last night when we had friends round for St Patrick’s Day dinner and they made light work of distributing my ridiculously complicated Wi-Fi password.

Just scan the QR code, choose "Copy Password" then paste it into the device's Wi-Fi settings

You’ve probably seen QR codes before.  QR codes are those square barcode things you’ve seen popping up on advertising posters.  They’re normally used to provide an easy way of entering web addresses into smartphones, but they can be used for lots of other types of information – including Wi-Fi network details.  To use them you simply open a QR code reader app, scan the QR code with your camera and then the phone decodes the information.

To help your guests get online, all you need to do is create a QR code that contains your Wi-Fi details, then print out a “cheat sheet” for your guests to use.

You can create your QR code here by choosing “WiFi Network” from the “Select a Code Action” drop-down:

Once you’ve got your QR code, copy and paste it into your “cheat sheet”. Here’s a template for creating your own cheat sheet.

Does this approach help you? Any other suggestions for making this stuff easier? Please let me know in the comments.