Alphabot2 for micro:bit User Manual
17 / 76
if then block is in Logic package, button is pressed block is in Input package.
1. Place if then block on forever, then put button is pressed block on it.
2. Place show string block, then clock ⊕ icon to complete the codes as below:
3. Connect your micro:bit to PC, click Download to flash the code to your board.
Press buttons on micro:bit to test if expected string is displayed.
【Tips】
Some users may notice that in this script, A+B are detected first instead of A or B. You
can try to change the detect order to see what will happen.