implement button press/release with double check using mbed OS

Changes