On the micro:bit hardware details page, I saw
Front buttons A and B ... are debounced by software, which also includes short press, long press, and ‘both A+B’ press detection.
So, why not write an async button press detection program as a practice?
This project uses micro:bit v2, not v1.
When building, make sure probe-rs and target thumbv7em-none-eabihf are installed.
Install them with
cargo install probe-rs-tools
cargo target thumbv7em-none-eabihf-
Plug the board to your computer
-
Run the command
cargo embed --release