golang and recover

Go’s panic() function is great, it allows you to cause the entire program to exit if there is an error, much like exceptions in another languages, except that Go will print out useful information about your current goroutines. On top of that, when panicking begins, all of your deferred functions are also called, allowing you to tidy up any resources before the program exits. I used to think this was great already, but then I stumbled upon the recover() function when looking through the net package’s source code.

Remote Control Lights using a Raspberry Pi

I got fed up with using my Arduino to interface with hardware. It’s really easy to use and wire things up, but actually transferring data between it and a PC (and possibly a server of some sort) is pretty painful. It usually requires using serial communications and some data serialisation method. So I thought I’d use a Raspberry Pi for a change! I already had a 433 MHz transmitter/receiver pair working with the Arduino.

Decoding Audio with FFMpeg

For some reason there doesn’t seem to be much help on the internet on how to basically decode an audio file to raw samples using FFMpeg… So here’s one I made! As you can guess, I looked for a long time and ran in to many problems. One big problem seemed to be that lots of example code used depreciated functions which complicated problems :( especially the resampling functions. I got it working in the end though!

Object Detection for an Eye-Tracking Robotic Arm

For my 4th year engineering project at university, I worked with a group of engineers to create a semi-autonomous robotic arm system which accepted user input via an eye-tracker. My task in this project was to develop the object detection system to help guide the arm around the workspace. View the presentation View my code on GitHub

Autonomous Control & 3D Vision of a RC Helicopter

For my 3rd year engineering project at university, I developed a system using my Mac, an Arduino and a Kinect which could autonomously fly a small RC helicopter around a room. This took a lot of work, but worked awesomly in the end! I was able to create a system that allowed the helicopter to hover at a height of 1 metre off the floor, and centre relative to the Kinect camera.