http://developer.mbed.org/teams/ROBOSTEP_SHARE/code/EC/#d73c40fd4b55