https://developer.mbed.org/users/Javier117/code/nRF51822/#86bab11e2a7f