Project 2: Go Backwards for 1 Second
Share
Project 2: Go backwards for 1 second, and then stop
To go backwards, we need to change the motor command to go backwards. Click on the right side of the motor command to open the motor block settings again.
Click the -10% buttons until you get to -100% -100% motor speeds.
Then click OK.
To place a wait command, click the hourglass button and click the green space like you did for the motor block in Project 1.
The wait time is already set to 1 second, so just click OK.
Now we need to tell the motor to stop. Otherwise the motors will just keep going because they weren't ever told to stop. This is an important concept to understand. To make the motors do something for some time, you need to make a motor command, then wait for some time, then tell the motors to stop.
So to tell the motors to stop we will place another motor command.
Use the -10% and +10% buttons to set each side to 0%.
Press OK.
Your program should look like this:
We command the motors to move forward. Then we wait for 1 second (while we wait, the motors are still turning!). Then we command the motors to stop.
Build, upload and Test the program like we did in Project 1.