http://mbed.org/users/tomlankhorst/code/HIDScope/#5020a2c0934b