RasPi HUD In Action!

Quick video showing the entire setup in action.

Basic HUD Info Program using Python and Clutter

I made a simple program in Python to show the date, time, and the next upcoming calendar event from my Google Calendar. This will be the program which runs on my Raspberry Pi HUD. The GUI was built using Clutter. I generated the Python bindings for Clutter using GObject Introspection.

To read the calendar event data, I used the private XML data feed for my calendar (which can be found in the calendar settings), and parsed it with elementtree. To get the XML feed to show recurring events and dates, I had to change the “basic” parameter at the end of the HTML request to “full?futureevents=true”.

The next version of the program will most likely use Google Apps API and the corresponding Python client library to let me hook into other Google services, such as tasks and Gmail.

You can find the full code here: http://pastebin.com/pUSbyFAv

HUD Casing and Input

I’ve actually had this done for a few weeks now, but I’m only getting to post it now.


I used a plastic enclosure from OKW Enclosures, and cut out slots for a power button for the display controller, a power switch for the RasPi, and a slot for the wire.



Mouse Input

I purchased a “Ring Mouse” made by Genius to use as an input device. It fits right on your finger with a rubber strap, which is pretty nifty. You move your thumb around on the optical sensor to move the mouse and press down on it to click. It seems there are only Windows drivers for the device, so I’ll have to find one that someone else has written or make my own.Image

Tethering the Raspberry Pi with an Android Phone over Bluetooth

I am tethering my Raspberry Pi with my Android phone over Bluetooth for internet connectivity.

I used the Kinivo BTD-300 Bluetooth 3.0 USB dongle, which works right out of the box.

Here are the steps I used to get tethering working:

  1. Install bluetooth packages:
    apt-get install bluetooth bluez-utils blueman?bluez-compat
  2. Check if the USB dongle is detected with lsusb
  3. Run the /etc/init.d/bluetooth status command to check if bluetooth is running. The output should be something like this: Bluetooth is running.
  4. Turn your phone’s bluetooth on and set it to be visible. Scan for it with: hcitool scan. Your phone’s name and MAC address should appear.
  5. Pair the two devices by running bluetooth-agent 1234, replacing ‘1234’ with a PIN code of your choice. Connect to the Pi from the phone.
  6. List all the devices that are paired using sudo bluez-test-device list. The phone should appear in the list if it was successful.
  7. Create a PAN connection with: sudo pand -c --role PANU --persist 30.
  8. Add the following line to /etc/network/interfaces: iface bnep0 inet dhcp

Your Pi should now be tethered! Add the pand line to /etc/rc.local to have it automatically begin on startup. The persist option means it will try to reconnect every 30 seconds if the signal is lost.

Powering the Raspberry Pi with a Lithium Polymer Battery

I’m not quite sure what I was thinking before, but the 1C (3.7V) LiPo pack that I am using obviously isn’t a high enough voltage to power the 5V rail using the built in linear regulator. To fix this without buying a 2C pack and worrying about regulating down 7.4V, I will be replacing the 5V linear regulator with an Adjustable Boost Regulator from Pololu. This also has the added advantage of conserving power, as switching regulators are much more efficient than linear ones.

Another consideration is safely powering off the Raspberry Pi as the battery level gets low, as not doing so will most likely result in a corrupted file system and other unhappy things. The display controller flashes some orange LEDs when the battery level gets too low. I may be able to take the output to the LEDs and tie it to one of the GPIO pins with a pullup resistor. Otherwise, I would need to purchase and add a separate ADC and voltage reference to measure the battery voltage, which will be considerably more challenging.

Wearable Computer, Part 1


Over the past few years, smartphones have become ubiquitous as a constant mobile information stream. However, the issue with smartphones is that they’re not glancable – you can’t passively pull your phone out while walking down the street or in a conversation. Two paradigms have been emerging to address this: watches and head-mounted displays. Products like the Pebble and Google Glass are quickly heading towards market. I decided to go the head-mounted display route, because there are no size limitations as in a watch – the electronics and power can be stored elsewhere.


The display is taken from a MyVu Solo, a wearable display with a resolution of 320×240 and accepts composite input. I sawed off everything but a single display and mounted it on a frame made from a wire hanger. It’s possible to find MyVu displays used online for fairly cheap.

2013-01-05 19.02.49 hud


For the computer, I’ve opted to use a Raspberry Pi. The RasPi isn’t exactly intended to be an embedded system as evident from the linear voltage regulator and lack of real-time clock, but it’s hackable with its GPIO pins and has convenient composite output for the MyVu. To pull information, I will be connecting the RasPi to my Android phone via USB and the Android Debug Bridge, which has been ported to RasPi. This should allow tethering for internet, as well as opening up a TCP port to grab information from the phone itself (time, calendar events, messages, calls, etc.)

2013-01-09 19.23.38


The main input method that I am considering right now is the Texas Instruments Chronos watch. It has buttons and an accelerometer for input, and communicating with the watch over a wireless USB dongle just a simple serial stream. I still need to figure out the best way to utilize the accelerometer for control; one method I am considering is rotating my wrist to move a slider and snapping to select, similar to a click wheel. I could also use some sort of gesture recognition.

Other potential forms of input are a touch screen, Leap Motion (currently not supported on Linux and perhaps never on ARM), and an eye tracker.


The MyVu controller already had a single cell Li-Ion battery soldered in, using this charge controller from Microchip. I replaced the battery with a beefier 3000 mAh LiPo pack of three cells in parallel, and then soldered a USB connection to power my RasPi as well.

New Battery Hacked onto HUD and Computer 2013-01-09 20.50.28

Quadrotor Control Board


The Quadrotor Control Boards I ordered from Seeed Studio’s Fusion PCB service arrived today. All looks to be in good order.


Get every new post delivered to your Inbox.

Join 467 other followers