Posts Tagged ‘ Hardware ’

Blink(1) + Google Latitude = “Where’s Daddy?”

A while back, I backed a Kickstarter: Blink(1) – The USB RGB LED. In a world of next-day instant-gratification deliveries, it’s always a pleasant surprise when something you totally forgot about ordering turns up.

It fits neatly into the spare USB port under an Apple keyboard.

2012-12-13 20.18.07

Time for a Pomodoro hack – make something useful in 25 minutes. No time for over-engineering – hack fast!

After a long delay on the train yesterday and my kids calling up to ask if I was nearly home yet, I knew exactly what I wanted to build…

The “where’s daddy?” indicator:

  • Blue -> home (or near home)
  • Red -> work
  • Green -> commuting.

Ingredients:

Timeline:

  • Minutes 0-3: Unpack Blink(1), download command line tool, and test it out. Looks good.
  • Minutes 4-14: Read the API docs for Google Latitude. Tried really hard to get authentication working but realized I was burning time. Arrrg, the pressure – this is taking too long! Aborted and looked for a quicker way.
  • Minutes 15-18: Found a quicker, hackier way to get Google Latitude data. Worked!
  • Minutes 19-22: Hacked up a quick Python script to poll Google Latitude, and convert the coordinates to a value from 0.0 to 1.0 where 0.0 is home, 1.0 is work and 0.5 would be half way between.
  • Minutes 23-25: Based on the number, call the blink1-tool command setting the color to indicate my location.

2012-12-13 20.18.18 2012-12-13 20.18.29

Here’s the code:

https://gist.github.com/4282399

(Ok, I cheated a little – I spent another Pomodoro cleaning up the code, adding comments, etc and another 2 Pomodoros writing this blog post).

Hello Pi Crust! Connect things to your Raspberry Pi

[Update: discuss on Hacker News]

This is the Pi Crust:

Pi Crust

It lives at http://picru.st/.

It’s a little PCB I designed to make it easier to experiment with electronics and the Raspberry Pi.

You stick it on a Raspberry Pi, like this:

Pi Crust, on a Raspberry Pi

Some features:

  • Really compact – sits inside the surface area of the Raspberry Pi and adds less than 2mm to the height. If you have a case for your Raspberry Pi, this board may well fit inside it.
  • Pins are grouped together: GPIO, I2C, SPI, UART and power.
  • Every pin is clearly labelled.
  • Connections: 2 x SPI, 2 x I2C, 1 x UART, 8 x GPIO.
  • Uses female headers instead of male headers – you can poke jumpers right in.
  • Lots of GND and 5V pins – you need those guys a lot. These pins are duplicated where it makes sense (e.g. within the UART, I2C and SPI groups).
  • All thru-hole components – you can solder it yourself.
  • Cheapety cheapy cheap.
  • Open source hardware.

There are lots of other boards out there, but this is unique in that it fits nice and snugly against the Pi, keeping your projects compact.

Nice and snug

Now you can easily find all those pins:

PCB

Find out how to make one for only a few $ at http://picru.st/

[Update: discuss on Hacker News]