1 of 72

Maqueen Workshop for Kids

by https://www.vorburger.ch and work colleagues (anon)

This is the English version; there is also a German translation.

2 of 72

Agenda

  1. What is a computer?
  2. Your own (tiny) computer!
  3. What is a robot?
  4. Assemble your robot!
  5. Make your robot move!
  6. Follow the line!
  7. What’s next?

3 of 72

What is a computer?

LeT’s play a quiz... Is this a computer?

​

4 of 72

5 of 72

6 of 72

7 of 72

8 of 72

9 of 72

Google Home Mini

10 of 72

11 of 72

Fitbit

12 of 72

13 of 72

14 of 72

~10’ into

15 of 72

YOUR own new (tiny) computer

16 of 72

Our robot “brains”

Important: Hold the controller board by the sides!

17 of 72

Our robot “brains”

18 of 72

Let’s get started!

  1. Navigate to https://makecode.microbit.org�There are lots of potential beginner projects, but we’ll skip them
  2. Click on New Project

​

​

  • Give it any name you want

​

19 of 72

Let’s build a dice roller

  1. Click on Input
    1. Drag On Shake block to work area
  2. Click on Basic
    • Drag show number into on-shake
  3. Click on Math
    • Drag pick random 0 to 10�into show number
  4. Change the numbers to 1 and 9

20 of 72

Try your program in the simulator

21 of 72

Let’s program the controller

  1. Unpack micro:bit
  2. Plug in the USB cord into the computer and into micro:bit
  3. Press [...] button next to Download in your project
  4. Do you have a Connect Device button?
    • Yes? Click Connect Device and follow the instructions. Then, click download.
    • No? Click Download, which should download a microbit-*****.hex file. Drag that file into the MICROBIT drive.
  5. Yellow LED will start blinking
  6. When the blinking stops the controller is programmed
  7. Play with your electronic dice roller

It should appear as a disk (MICROBIT)

Hold micro:bit by the edges!�(But later hold the robot on wheels.)

Do not unplug the USB cord while the light is blinking!

22 of 72

23 of 72

More sides

Fewer sides

24 of 72

Changing the possible dice rolls

  • Click on Variables
    • Click on Make a Variable…
    • Name it maxDiceValue
    • Drag set maxDiceValue to 0 into on start block
    • Change 0 to 6
  • Click on Input
    • Drag On Shake block to work area
  • Click on Basic
    • Drag show number into on-shake
  • Click on Math
    • Drag pick random 0 to 10 into show number
  • Change 0 to 1
  • Drag maxDiceValue from Variables to replace 10

25 of 72

Program buttons

26 of 72

~30’ into

27 of 72

What is a robot?

28 of 72

29 of 72

30 of 72

DIY ?

DIY = “Do-It-Yourself”

​

Let’s build one!

31 of 72

32 of 72

33 of 72

Your Maqueen robot

34 of 72

What can Maqueen “see”

Infrared light sensor

Ultrasonic sensor

interface

Infrared line-tracking sensors

35 of 72

What can Maqueen show

Right LED

Left LED

Line-tracking status LEDs

Color LEDs (RGB)

Power on

36 of 72

What can Maqueen do

Buzzer to make sounds

Left motor

Right motor

37 of 72

How do we control Maqueen

Buzzer switch

On/off switch

micro:bit interface

38 of 72

Let’s assemble the robot step by step

  1. Assemble wheels and tires.
  2. Find the battery holder.
  3. Find double-sided tape.
  4. Glue one side of the tape as shown

DO NOT HURRY!

WAIT FOR EVERYONE!

Tape goes here

39 of 72

Assembly continued...

  1. Plug in the battery cord into the board
  2. Glue the battery holder to the wheel motor cases
  3. Plug in the ultrasonic sensor

​

DO NOT HURRY!

WAIT FOR EVERYONE!

40 of 72

Finish assembly

  1. Plug in the micro:bit board with LEDs facing towards the ultrasonic sensor
  2. Insert batteries

​

​

DO NOT HURRY!

WAIT FOR EVERYONE!

​

41 of 72

Battery Insertion⚠️

You HAVE to make sure the batteries are inserted with the correct +/- “Polarity”.

If you put them in the wrong way, the robot will 👩‍🚒 BURN and Google will 🧨 EXPLODE.

Actually not really (the latter, but the former could). Ask your Table Lead to help or check!

42 of 72

Configure MakeCode

  1. Click on +Extensions
  2. Click on the “maqueen” picture (below)
  3. You now have new Maqueen blocks

43 of 72

Simple first program

When button A is pressed then:

  • Turn on the lights
  • Turn on one motor

Download and transfer to micro:bit:

  1. Switch the robot off!
  2. Connect USB cable (You can leave the micro:bit in the robot)
  3. Download
  4. Unplug USB cable
  5. Switch robot on

44 of 72

~90’ into

45 of 72

Second program, with the ultrasonic sensor

Did it fall off the table? ;-)

Stop the motor and turn off the lights when its ultrasonic sensor sees something is within 10cm.

46 of 72

Navigate!

Make your robot wander around the room without crashing into anything.

Instead of stopping when it sees something in the way, what should it do?

​

Other ideas:

  1. Use the LED lights as turn/reverse signals.
  2. Increase and decrease speed when buttons pressed or near an obstacle.
  3. Make it play some music when it moves.
  4. Make it stop and play rock paper scissors with you when it hears a loud sound.
  5. ANY other ideas you have... it’s yours now!

47 of 72

Example solutions

Navigating around obstacles example solution & demo.

Changing speed around obstacles example solution.

48 of 72

Idea: Make Lights blink!

49 of 72

~120’ into

50 of 72

Follow the Yellow brick road

Black line

51 of 72

Our mission: get Maqueen to follow a route

52 of 72

What do we do?

53 of 72

What do we do? Go right!

54 of 72

What do we do?

55 of 72

What do we do? Turn left!

56 of 72

What do we do?

57 of 72

What do we do? Go straight!

58 of 72

What do we do?

59 of 72

What do we do????? Need to find our way!

60 of 72

What do we do????? Run in a circle!

61 of 72

Putting it all together

  • If both sensors are on the black strip�→ Go straight until we find the edge
  • If exactly one sensor is on the strip we know where the road is�→ Turn to try to get both sensors on the line
  • If no sensor is on the strip�→ We are lost�→ Try going in a circle to find the line

62 of 72

Jump start with the code

Hint: don’t set the speed to high!

63 of 72

Maqueen: More things, to try out at home!

​

64 of 72

Appendix: Infrared (IR) Remote

65 of 72

66 of 72

Remote Control

  1. Watch this video
  2. Click on IR
    • Drag the on IR received block to the work area
  3. Click on Basic
    • Drag show number to the work area
  4. Click on Variables
    • Drag message into show number
  5. Download your program to the Maqueen
  6. Try: if 'message = 5' then show icon

21

67 of 72

Die Fernsteuerung

Mach Dir eine Tabelle!

​

Taste

Code

On/Off

0

VOL

?

...

...

0

?

...

...

9

?

68 of 72

Fernsteuerung: Lösungsansatz

69 of 72

Statt Fernsteuerung: selbst fahren!

Lass deinen Roboter durch den Raum wandern, ohne gegen etwas zu stoßen.

Was sollte er tun, anstatt anzuhalten, wenn er etwas sieht, das im Weg steht?

70 of 72

Appendix: Solutions

71 of 72

Simple follow-the-line solution

You’ll have to adjust the speed for your robot.

72 of 72

Possible alternative follow-the-line solution

You’ll have to adjust the speed for your robot.