Sail Away
Program a servo motor to open and close a sail, and get the boat to the finish flag before the wind turns against you.
- Teaches: If / then
- Free
Play Sail Away
Free. No sign-in. Works best on a laptop or Chromebook.
How to play
A servo is a motor that turns to an exact angle. Here, servo ON opens the sail and servo OFF closes it.
- Steady breeze. With the wind behind it, an open sail moves the boat one wave every second. The starter program stops short. Fix the number.
- Gusty bay. A headwind pushes an open sail backward. Read the forecast, find the pattern, and let a loop repeat it.
- Mystery wind. No forecast, and the wind is different on every run. Use the wind sensor block so the boat decides for itself.
Before each run, predict where the boat will stop. Then press Run and see.
What you are learning
Timing only works when you know what is coming. When you don’t, the program has to check and choose: if the wind is behind us, then open the sail. That is how a robot reacts to the world around it.