http://mbed.org/users/JacobBramley/code/PixelArray/#47802e75974e