Introduction To The BBC Micro - Bit

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Introduction to the

BBC Micro:Bit
CAS Manchester Workshop
September 2017

Jamie Edmondson
CAS Master Teacher
@jecomputing
[email protected]
Objectives

● Overview of the Micro:Bit and basics


● Basic commands
● Downloading the .hex file and running it on
device
● Input commands
● Variables
● Conditional selection
Overview

● A pocket-sized codeable ● Can use as a games controller


computer (e.g Kodu)
● 25 red LEDs that light up, ● On board motion detector
flash messages etc. ● Built in compass
● Has two programmable ● Bluetooth connectivity
buttons.
Emulator
Getting to know the Micro:Bit
(Basic commands)

Minecraft Creeper
Activity 1: Smiley Face

Task: Make a smiling


face, then run it on
the emulator. What
other shapes, pictures
can you get it to
display?
Challenge: Now try running your code on the device itself (you
will need to download the code and drag the .hex file to the
Micro:Bit folder).
Input Commands
Different ways to run your code

Activity 3: Scrolling name


badge

Task: Make yourself a scrolling


name badge! How about using a
different command (e.g. ‘on
Input Commands

Activity 4: Dice Emulator

Challenge: Can you make the dice pick from 12 numbers? Can you run it
based on a different input command?
Input Commands
Activity 5: Game of
chance
Task: Make a simple game for
a peer to play whereby they
have a 50/50 chance of
winning depending on which
button they press.

Challenge: Can you add a different condition (e.g. ‘on shake’


or when button a and b are pressed together it displays the
words “try again”).
Input Commands

Activity 6: Rock, Paper, Scissors

Task: Make a version of ‘Rock, Paper, Scissors’ to play against a


partner!
Using Variables

Activity 7: Make a thermometer!

Task: Make a thermometer by adding a ‘temperature’


variable
Conditional
Selection
Activity 8: Rock, Paper, Scissors

Task: Extend earlier version of


‘Rock, Paper, Scissors’ to
include selection (i.e. output
will only happen if certain
condition is met otherwise
something else will happen
instead). Language of selection ‘if, then
and else’
Conditional
Selection
Activity 9: Fortune Teller
(Project 3 from Code Club Micro:Bit projects)

Challenge: Can you make your Micro:Bit say something like ‘Maybe’ or ‘Ask again’ if the answer is 2. To get
this working, you’ll also need to change your code to choose a random number between 0 and 2! Tip: You
can right-click on a block to duplicate the block and its contents.
Conditional
Selection

Activity 10:
Making a compass

Task: Can you make


use of the Micro:Bit’s
motion detector to
create your own
Compass
Conditional
Selection
Activity 11: Reaction
game(Code Club Project 6)
Challenge: Can you use two
variables called Player A and
Player B to keep track of each
player’s score? You’ll need to
set both scores to 0 at the
start of the game by placing
code inside the ‘on start’ block
and add 1 to whichever player
wins each round. You’ll also
need to think of a way to
Links

Code Club Projects (Micro:Bi


t)

Matt Moore Blog

Range of Micro:Bit lesson pl


ans, resources and activities
(Ellie Overland)
Any Questions?
An introduction to the BBC Micro:Bit
CAS Manchester Workshop September 2017

Jamie Edmondson
CAS Master Teacher

@jecomputing
[email protected]

http://tinyurl.com/casman-e
valuate

You might also like