-MR. LOCKE'S WEBSITE-
  • Grade 6
    • Canva
    • Code.org
    • Culinary Tech
    • Easel
    • Ignition
    • LEGO Education
    • Makey Makey
    • Scratch
  • Grade 7
    • Canva
    • Code.org
    • Culinary Tech
    • Easel
    • Everfi
    • LEGO Spike
    • Photoshop
    • Scratch
    • Tinkercad
    • Video Editing
  • Grade 8
    • Canva
    • Code.org
    • Culinary Tech
    • Easel
    • Everfi
    • LEGO Spike Prime
    • Scratch
    • Sketchup
    • Tinkercad
    • Video Editing

mBot

Picture


​STAGE 4
Light Sensor


Your mBot is equipped with its very own light sensor. This means that it can sense the degree of light that is present in the room.

With this in mind, you need to program your mBot so that it automatically spins around in circles whenever you cover it with something like a textbook, a binder or an agenda. Then, the mBot needs to immediately stop spinning once it is no longer covered.

To get started, add the following code to your project:
Picture
Then click the Green Flag to start the program. The value picked up by the light sensor will now constantly be displayed on the screen (in the Panda's speech bubble). The higher the number, the more light it is detecting.

Now cover the mBot (again, use something like a textbook, a binder or an agenda). You should see that the value picked up by the light sensor changes whenever you do this. It should be lower now.

You should now be ready to make the mBot spin when it's covered and freeze when it's not covered.

Try to figure this out on your own first. Take your time. Don't be in a rush.

If you REALLY need help, let Mr. Locke know and he might show you a hint. Maybe.

Picture

​Show Mr. Locke that you have successfully completed this stage and then you can move on to the next one.
Next
Picture
Picture
email Mr. Locke
  • Grade 6
    • Canva
    • Code.org
    • Culinary Tech
    • Easel
    • Ignition
    • LEGO Education
    • Makey Makey
    • Scratch
  • Grade 7
    • Canva
    • Code.org
    • Culinary Tech
    • Easel
    • Everfi
    • LEGO Spike
    • Photoshop
    • Scratch
    • Tinkercad
    • Video Editing
  • Grade 8
    • Canva
    • Code.org
    • Culinary Tech
    • Easel
    • Everfi
    • LEGO Spike Prime
    • Scratch
    • Sketchup
    • Tinkercad
    • Video Editing