http://mbed.org/users/Reiko/code/DoubleCoilGun/#49959d33916f