Assignment 3 for Heriot-Watt's Embedded Systems course 2013/14