Pressing 2 - Waveshare Alphabot2 User Manual

For micro:bit
Table of Contents

Advertisement

Alphabot2 for micro:bit User Manual
2.
Place
show string
display. Duplicate and complete the script to as below:
3.
Connect your micro:bit to PC, click
Press buttons on micro:bit to test if expected string is displayed.

PRESSING 2

There is another way to detect buttons. In last section, codes are run when button is
pressed, here we use
Instead of running code directly, a Boolean value
pressed, "false" if button is not be pressed.
Boolean value: True or False
2
block in
on button pressed
Download
if then
and
button is pressed
block to display string on LEDs
to flash the code to your board.
blocks to do the same thing.
"true" is returned if button is
2
16 / 76

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Waveshare Alphabot2

Table of Contents