1 of 66

Hands on with the micro:bit

Neil Rickus

Senior Lecturer in Computing Education

University of Hertfordshire

n.rickus@herts.ac.uk @computingchamps

Slides - bit.ly/csta18-handson

Resources - computingchampions.co.uk/csta18

2 of 66

3 of 66

4 of 66

Physical computing in the primary curriculum

Where does it fit in at KS2 (age 7 - 11) English Computing National Curriculum?

  • design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts
  • use sequence, selection, and repetition in programs; work with variables and various forms of input and output

5 of 66

Concepts and Vocabulary

5

Microcontroller

(Process)

Output

Light - Sparkle, LED

Movement - motor

Sound - buzzer

Input

Sensors

Button or toggle switch

LDR - light dependent resistor (light sensor)

Tilt switch

Distance sensor

6 of 66

Why physical computing?

  • Further develop understanding of programming concepts - “instant feedback and a motivational environment” - Sentance, S. & Waite, J. (2018). Computing in the classroom: Tales from the chalkface. it - Information Technology, 60(2), pp. 103-112
  • “Light bulb” moment!
  • Links to other areas of the curriculum, particularly DT and Science
  • Solve real world problems
    • Not just “making a game today”
    • Stepping stone to text based programming

7 of 66

Encouraging diversity and inclusion

  • CAS Include – casinclude.org.uk
    • Challenge stereotypes – wall displays, trips, guest speakers
    • Promote career opportunities
    • Use technology with a range of outputs
    • Provide time for tinkering
    • Scaffold learning appropriately
  • Girls’ Day School Trust (online course on Girls’ Education) – futurelearn.com/courses/girls-education
    • Promote collaborative opportunities
    • Develop opportunities for talk

8 of 66

Encouraging diversity and inclusion

  • Institute of Physics - iop.org/education/teacher/support/girls_physics/page_41593.html
    • Avoid asking for volunteers
    • Assign roles for practical work (e.g. paired programming)
    • Use gender neutral contexts where possible (e.g. male / female hobbies)
  • Phil Bagge – http://philbagge.blogspot.co.uk/2015/02/eight-steps-to-promote-problem-solving.html
    • Encourage resilience and avoid “learned helplessness” – sweet / aggressive

9 of 66

10 of 66

11 of 66

12 of 66

Why these technologies?

  • Open ended tasks
    • Creativity
    • Enquiry
  • (Mostly) affordable
  • Extended with existing equipment
    • LEDs, buzzers, crocodile clips, etc
  • Block based programming environment

13 of 66

14 of 66

15 of 66

Micro:bit

  • Cost – $17 board; £21 starter kit
  • More info – microbit.org
  • Given to all Y7 (11-12 years) pupils in the UK in 2016

  • Projects
    • Step counter
    • Table football
    • Bloodhound Rocketcar

16 of 66

MICRO:BIT FOR PRIMARY SCHOOLS – MB4PS.CO.UK

Physical Computing in a box

Written by Neil Rickus. Licensed under CC BY-NC-SA 4.0

bit.ly/phys_comp_microbit

17 of 66

OBJECTIVES – PART 1

  • Introduce the micro:bit components
  • Discuss micro:bit safety features
  • Make a program with the block editor
  • Transfer the program to the micro:bit

  • Produce scrolling (moving) text
  • Implement pauses
  • Display images

18 of 66

MICRO:BIT COMPONENTS

Image source - https://www.microbit.co.uk/device

19 of 66

STAYING SAFE

Image source - https://microbit0.blob.core.windows.net/pub/dfuwbkqk/student-saftey-guide.pdf

20 of 66

MICRO:BIT WEBSITE

  • Plug in your micro:bit using the USB cable. The cable will only fit one way
  • Using Google Chrome, go to microbit.org and click on Let’s Code
  • We’re going to use the JavaScript Block

Editor (PXT), so click Let’s Code

21 of 66

YOUR FIRST PROGRAM

  • We’re going to make a message scroll (move) across the screen
  • Drag the blocks below from Basic into the area in the middle of the screen
  • You should see your program run on the emulator on the left

22 of 66

TRANSFERRING THE CODE

  • Click Download to download your code
  • Click Done on the pop up box

  • Once your file has downloaded, click on the arrow by the file name and select Show in folder

  • Drag the file to the micro:bit device on the left of the window
  • Watch your program appear on your micro:bit!

23 of 66

CHALLENGES

  • Make your micro:bit display two messages, with a pause in between
  • Make two images appear between the text
  • Clear the screen for a short amount of time between the images displaying

microbit.org -> Let’s Code -> JavaScript Block Editor (PXT) -> Let’s Code

24 of 66

OBJECTIVES – PART 2

  • Display images
  • Respond to button presses
  • Respond to movement (shaking)

25 of 66

BUTTON PRESSES

  • We’re now going to use the buttons to make stuff happen
  • Program your micro:bit to display an image when a button is pressed

26 of 66

CHALLENGES

  • Make your micro:bit display a different image when button B is pressed
  • Make your micro:bit display a different image when buttons A and B are pressed
  • Make your micro:bit display a different image when you shake it

  • Try to include instructions from the previous

part, such as pauses and clearing the screen

You may wish to use a “forever” loop to create

a short animation

27 of 66

OBJECTIVES – PART 3

  • Use variables to store information
  • Change the value of variables

28 of 66

MAKING A VARIABLE

  • We’re now going to use a variable to count the number of button presses and output these on the micro:bit display
  • We can create a new variable by clicking on Variable, then selecting Make a variable

  • Give your variable a suitable name, such as counter

29 of 66

CHANGING VARIABLE

  • We’re going to set our variable to zero when our program starts

  • We can then increase the value by one every time we press button A and show the number on the screen

30 of 66

CHALLENGES

  • Make your micro:bit only display the number of button presses when you press button B
  • Make the value of counter increase by 10 when you shake the micro:bit
  • Display a message when the counter reaches 100
  • Make the value of counter increase

by 100 when you press pin 0

(Hint: you need to press 0 and GND

on the rail at the bottom of the

micro:bit)

31 of 66

OBJECTIVES – PART 4

  • Develop a micro:bit based Step counter

32 of 66

FEATURES

  • The NHS recommends you take 10,000 steps each day -> default target for FitBit

  • What features do step counters have?
  • What features are:
    • Essential?
    • Desirable?

33 of 66

Science curriculum links

Y6 - Animals including humans

Pupils should be taught to:

  • recognise the impact of diet, exercise, drugs and lifestyle on the way their bodies function

The step counter could also be linked to PSHCE topics on healthy living

34 of 66

FEATURES

  • Essential:
    • Count number of steps
    • Display number of steps

  • Desirable:
    • Show number of steps to target
    • Set target number of steps
    • Display motivational messages

35 of 66

IMPLEMENTATION

  • For the essential features, discuss how you might implement them
  • Focus on the functionality, rather than the specific blocks you’ll need
  • Use a whiteboard and pen if you need it

  • Essential:
    • Count number of steps
    • Display number of steps

36 of 66

COUNTING STEPS

  • We need a variable to

record the number of steps

  • We then increase the steps

each time we shake the

micro:bit

  • We can display an image to

show we took a step

37 of 66

COUNTING STEPS

  • We need a variable to

record the number of steps

  • We then increase the steps

each time we shake the

micro:bit

  • We can display an image to

show we took a step

38 of 66

DISPLAYING STEPS

  • When button A is pressed,

we show the number of steps

for a short amount of time,

then clear the screen

39 of 66

DISPLAYING STEPS

  • When button A is pressed,

we show the number of steps

for a short amount of time,

then clear the screen

40 of 66

DESIRABLE FEATURES

  • Desirable:
    • Show number of steps to target
    • Set target number of steps
    • Display motivational messages

  • Could you record whether a step

is taken more accurately?

41 of 66

DESIRABLE FEATURES

  • Desirable:
    • Show number of steps to target
    • Set target number of steps
    • Display motivational messages

  • Could you record whether a step

is taken more accurately?

42 of 66

ACCURATE STEP RECORDING

  • We can record the number of steps taken more accurately by looking for changes in values recorded by the accelerometer

43 of 66

Pedagogy��Possible approaches…

43

Copy code

Read code

(predict)

Shared coding

Demo followed by….

Guided exploration

  • Make 1 motor move
  • Make it turn on and off
  • Change direction/speed
  • Give your partner a challenge and get them to code it.

Design a project

Tinker - no guidance

44 of 66

Reflection

  • Discuss with the people around you how you found undertaking the activities

45 of 66

Other technologies

  • Codebug
  • Crumble
  • Raspberry Pi
  • Lego WeDo 2.0
  • Sphero
  • ProBot
  • FlowGo

46 of 66

47 of 66

Codebug

  • Cost – $20 board and USB cable
  • More info – bit.ly/Xmasstuff

  • Projects
    • Scrolling display badge
    • Christmas tree lights

48 of 66

49 of 66

Crumble

  • Cost – $16 board
  • More info – redfernelectronics.co.uk/crumble/

  • Projects
    • Tuk Tuk derby - https://youtu.be/l25Vfz9GWIc
    • Lighthouse
    • Fairground rides

50 of 66

51 of 66

Raspberry Pi

  • Cost – $13 - $35 board (NB. Needs power supply, monitor cable, SD card, etc)
  • More info – raspberrypi.org

  • Projects
    • Pibrella
    • PiStop
    • CamJam EduKits

52 of 66

53 of 66

Lego WeDo 2.0

  • Cost – $170 core set and software
  • More info – education.lego.com/wedo2.0

  • Projects
    • Milo – moon rover
    • Anything with Lego!

54 of 66

55 of 66

Sphero

  • Cost – $120 ball and charger
  • More info – sphero.com

  • Projects
    • Assault course
    • Properties of shapes

56 of 66

57 of 66

ProBot

  • Cost – $120
  • More info – bit.ly/probot_tts

  • Projects
    • Properties of shapes, including drawing with a pen
    • Assault course
    • Reacting to sensors

58 of 66

59 of 66

Flow Go and Go Control / Flowol

  • Cost – $130 control box; $200 software site license
  • More info – bit.ly/flowgo_gocontrol

  • Projects
    • Fairground rides
    • Traffic lights

60 of 66

61 of 66

Adding to the micro:bit

  • bit.ly/sci_and_mb
  • sites.google.com/view/microbitofthings/home

  • Burglar alarm - crocodile clips, foil, buzzer, cardboard
  • Moisture detector - additional moisture sensor (£4 / $5)
  • “How clean is my pond?” - LEDs, LDR, black cardboard (£2 / $3)

62 of 66

63 of 66

Barriers

  • Time
    • Cross-curricular links; Digital Leaders
  • Kit
    • Beg, borrow, steal; Second-hand; Share; Promotions
  • Expertise
    • Needs confident teachers; Digital Leader support; “Hands-off guidance”

64 of 66

65 of 66

Competitions

  • TeenTech
  • PA Consulting Raspberry Pi
  • Nesta / IBM Longitude Explorer Prize (IoT)
  • Animation ‘18 (University of Manchester)
  • Constructionism
    • Audience = Quality enhancement
  • Funding
  • Resume / exposure

66 of 66

Reflection

Neil Rickus

Senior Lecturer in Computing Education

University of Hertfordshire

n.rickus@herts.ac.uk @computingchamps

Slides (Ironman) - bit.ly/csta18-microbit

Slides (this part) - bit.ly/csta18-handson

Resources - computingchampions.co.uk/csta18

Share one thing you’re going to take away from this session