Making magic
In this exercise, we will control our mBot using only our hands.
We will make it stop and even reverse. Just like real wizards.
You will learn:
- How to stop your mBot by using the ultrasonic sensor (distance < 30)
- How to make your mBot drive backwards by using the ultrasonic sensor (distance < 20)
- Working with various if ...then ... else functions.
Open the mBlock programme on your computer, turn on your mBot and connect.
PREPERATION
Check the steps in "execute". Answer the following questions:
- Which steps should I follow?
- Which steps can I take?
- How much time do I need?
- What tools do I need?
EXECUTE
Perform the steps one by one. Have you forgotten how to do it? Look at the hints or download the solution.
STEP 1
STEP 2
STEP 3
REFLECTING
Look back at the project you just made. Ask yourself the following questions:
- Does the programme work like I expected?
- What is working well?
- What is not working well?
- How can I do things differently?
Download
Click on the links below to download the solutions: