Skip to main content

1.2

Major VersionM

by Pete Prodoehl

Introduction

Use the two built-in buttons found on the micro:bit

Take advantage of the built-in buttons found on the front of every micro:bit board.

Video Overview

Featured Document

  1. For this guide we won't need Maker Tape or any components. We're just going to put the micro:bit into the Bit Board.
    • For this guide we won't need Maker Tape or any components. We're just going to put the micro:bit into the Bit Board.

    • We're only going to connect a USB cable and use the built-in A & B buttons on the front of the micro:bit

    • We'll use the LED Matrix found on the front of the micro:bit as well, to react to our button presses.

  2. If you've never used a micro:bit before you'll want to check out this guide:  Bit Board V2 Setup and Use
    • If you've never used a micro:bit before you'll want to check out this guide: Bit Board V2 Setup and Use

    • We're going to load the following code for our Press A & B program: https://makecode.microbit.org/_TFccFteE9...

    • Notice this code does not have a forever loop! Instead it uses event handlers to react to specific input, in this case, pressing a button.

    • Once the code is loaded it should start running immediately.

    • You can power the micro:bit via the USB cable you used to load the code or you can use a battery pack plugged into the Bit Board.

    • When the code starts it will look like nothing has happened...

    • Press the A Button to see an "A" on the LED Matrix.

    • Press the B Button to see a "B" on the LED Matrix.

    • Now press and release both A and B buttons at the same time and the LED Matrix should clear and show nothing again.

    • Follow along with our recorded Live Stream!

    • You can watch the full video of us walking through this project, along with explaining and exploring the code: https://youtube.com/live/1WLUYItlSTY

Finish Line

Pete Prodoehl

Member since: 3/4/20

1,840 Reputation

424 Guides authored

0 Comments

Add Comment



View Statistics:

Past 24 Hours: 0

Past 7 Days: 1

Past 30 Days: 5

All Time: 98