© Pradeeka Seneviratne 2018
Pradeeka SeneviratneBeginning BBC micro:bithttps://doi.org/10.1007/978-1-4842-3360-3_3

3. Working with Buttons

Pradeeka Seneviratne1 
(1)
Mulleriyawa, Sri Lanka
 

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.

Built-in Buttons

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 ...

Get Beginning BBC micro:bit: A Practical Introduction to micro:bit Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.