1 of 11

MBot Dance Coding Lesson

Winter Quarter 2021

2 of 11

Review Blocks

Forever Loop

Start block

  • Repeats code inside block forever
  • Specifies what actions the robot does once it’s first powered on

3 of 11

Review Blocks

If-then statement

  • If the <__> is true, then the robot will do whatever is inside the block

4 of 11

New Blocks

Light sensor

  • If it’s dark, then do the actions inside the block

5 of 11

New Blocks

Play sound

  • Plays sound at specified note for specified length of time

Turn

  • Can turn left or right

6 of 11

New Blocks

Wait

Move

  • Robot does nothing for [1] second
  • Can move forward or backwards

7 of 11

New Blocks

  • Can choose what color the LEDs on the robot changes to

  • This block: turns all LEDs on the robot on with red light

8 of 11

Goals

Overall Goal: Make your MBot Dance!

9 of 11

Objectives

  1. Forwards and backwards
  2. Forever move
  3. Change colors three times
  4. Full spin

10 of 11

Remember!

  1. Make sure robot is switched to ON
  2. If going backwards switch cables
  3. UPLOADING:
    1. Use UPLOAD mode
    2. Make sure USB mode is selected in the pop up
    3. Connect the USB to your robot AND your computer
    4. Make sure the robot is on before uploading

11 of 11

blocks