Chapter 2 Buttons; Pressing - Waveshare Alphabot2 User Manual

For micro:bit
Table of Contents

Advertisement

Alphabot2 for micro:bit User Manual

CHAPTER 2 BUTTONS

There are two programmable buttons on the front of the micro:bit, which are labelled
A and B. In this chapter, we will code with these buttons.

PRESSING

Blocks we use in this section are included in
buttons on your micro:bit are pressed, codes are executed.
Coding the buttons to display characters, A when button A is pressed, B when button
B is pressed, and C when both buttons are pressed.
1.
We create a new project, place
A, button B or buttons A+B are pressed separately.
Input
package. With this block, if A or B
on button pressed
block to run codes when button
15 / 76

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Waveshare Alphabot2

Table of Contents