By now, you should be fairly comfortable with micro:bit LED display, images, and animations.
In this chapter, you learn how to use the two built-in buttons on the front of the micro:bit board. You also learn how to connect external buttons to handle user inputs and control the execution flow of a program according to the button events.
The micro:bit board has two built-in momentary pushbuttons soldered on the front of the board, labeled A and B. Button A is internally coupled to digital pin 5 and button B is internally coupled to digital pin 11. You ...