Mbot Test Experiments Your Mission:: The Least Number
Mbot Test Experiments Your Mission:: The Least Number
For each test, write your observation of the robot’s output below.
SAVE EVERY program you write!!!
Turn robot on and use IR control mode – it's the default white light.
#1 Use “when flag clicked” to run forward at speed 100, wait 1 secs,
run forward at speed 0. What distance did the robot travel? ____________cm
#2 Use “when down arrow key pressed”, run backward at speed 100,
wait 2 secs, turn left at speed 50, wait 2 secs, run forward at speed 100,
wait 1 secs, run forward at speed 0. How long did this take the mBot to do? ____________secs
#3 Use “when flag clicked”, repeat 2 loop, set LED on board all red 30 green 0 blue 30, wait
1 secs, set LED on board all red 60 green 0 blue 0, wait 1 secs, set LED on board all red 0
green 30 blue 30.
What colours flashed & how many times? ______________________________________________________
#4 Use “when flag clicked” to run forward at speed 200, repeat 3 loop, set led on board all
red 0 green 0 blue 0, set led on board led left red 0 green 0 blue 60, play tone on note 950
beat 600, set led on board all red 0 green 0 blue 0, set led on board led right red 60 green 0
blue 0, play tone on note 700 beat 400, run forward at speed 0.
How long did this take the robot to complete? ___________secs
#5 Program your robot to drive in the shape of a square. What is the least number
of blocks you can use to do this? (Remember to mark a start point!) ___________
#6 Program your robot to show a smiley face using the LED board. Use “when flag clicked”,
“show drawing”, “wait 1 sec”. Click on draw input field then choose smiley face from the
pre-loaded options. Finish with another “show drawing”, with a blank draw field. (Ensure
you have selected the same ports your robot’s LED is connected to.)
#7 Write a ‘hello’ message using “show drawing”, by selecting the lights needed from the
grid of squares. Program it to run for 5 secs, then show time of 4 hours and 35 mins for 5
secs, and play tone note A2, beat double for 10 secs. Set the LED to clear at the end. If it
doesn't clear from previous Smiley face click on draw field and press ‘clear all’ and
‘complete’.
#8 Remove the the LED light board and attached the distance sensor to the front of the
mBot. Use “when x key pressed”, repeat until ‘key space pressed’ loop, set distance to
ultrasonic sensor port 3 distance, if set distance < 10 then, run forward at speed 0,
else run forward at speed 100. Run forward at speed 0. Position your robot face 30cm from
a wall, press x, what happens?
________________________________________________________________________________________________________
Image source:
https://mars.nasa.gov/allaboutmars/extreme/