Microbits - Lesson 2

1 / 20
suivant
Slide 1: Diapositive
ComputingLower Secondary (Key Stage 3)

Cette leçon contient 20 diapositives, avec quiz interactifs, diapositives de texte et 1 vidéo.

time-iconLa durée de la leçon est: 50 min

Éléments de cette leçon

Slide 1 - Diapositive

Cet élément n'a pas d'instructions

microbit
LED
programmed
instructions
programs
code
flashing
Yellow

Slide 2 - Question de remorquage

Cet élément n'a pas d'instructions

Slide 3 - Diapositive

Cet élément n'a pas d'instructions

Slide 4 - Diapositive

Cet élément n'a pas d'instructions

Slide 5 - Vidéo

Cet élément n'a pas d'instructions

Slide 6 - Diapositive

Cet élément n'a pas d'instructions

TASK
Last week you made a simple dice program using 3 bricks of code
Can you modify this program to use a variable instead so that this value is then stored?
Teacher note - The next slide is a help sheet to make variables and solve the problem for scaffolding groups

Slide 7 - Diapositive

Cet élément n'a pas d'instructions

Slide 8 - Lien

The Dice Tutorial
Solution

Slide 9 - Diapositive

Cet élément n'a pas d'instructions

TASK
Ok - challenge time now....
Create the classic Rock, Paper, Scissors game on the microbit.

Teacher Note - For higher sets start with this without support. The next slides drip release help.  The last is a link to scaffolded walkthrough.

Slide 10 - Diapositive

Cet élément n'a pas d'instructions

Hint 1
You have 3 possible outcomes
It would be handy to have a variable assigned a random number between 1 and 3 to help with this

Slide 11 - Diapositive

Cet élément n'a pas d'instructions

Hint 2
We need to use a logic brick to know what to do when the variable is a 1, 2 or a 3
We could then display the right image in each case
We need another brick here to check if the variable "value" is a 1 or a 2.  Look in Logic section for this

Slide 12 - Diapositive

Cet élément n'a pas d'instructions

Hints support
You will need a variable to store a random number
IF that number is a 1 (for example) you display a Rock image
ELSE IF that number is a 2, you display a Paper image
ELSE you display a scissors image.

Condition?
You need to put some code in here that checks if your variable is equal to a certain number

Slide 13 - Diapositive

Cet élément n'a pas d'instructions

Slide 14 - Lien

Rock Paper Scissors
Solution

Slide 15 - Diapositive

Cet élément n'a pas d'instructions

How many LEDS does the Microbit have?
A
15
B
21
C
23
D
25

Slide 16 - Quiz

Cet élément n'a pas d'instructions

What is the part within the blue box called?
A
Input Buttons
B
CPU
C
Compass
D
LED Lights

Slide 17 - Quiz

Cet élément n'a pas d'instructions

A Microbit has an accelerometer, what does this do?
A
Measure temperature
B
Measure Movement
C
Measure direction
D
Measure light

Slide 18 - Quiz

Cet élément n'a pas d'instructions

When button A is pressed what will happen?
A
Hello will show on the Microbit
B
A heart will show on the Microbit
C
Hello followed by a heart will show on the Microbit
D
Nothing will happen

Slide 19 - Quiz

Cet élément n'a pas d'instructions

What do you think this code makes?
A
Calculator
B
Clock
C
Mood Generator
D
Dice

Slide 20 - Quiz

Cet élément n'a pas d'instructions