Lesson 7
Let's check the backward360 My Block you made in the last lesson. It should look like this:
It should be the same as forward360 but the arrows on the first two motor blocks and the wait block should be set backwards. Also, notice I haven't set the rotation sensor reset block to backwards. Remember, it is only reseting to 0 so the direction in the compare section doesn't matter.
Now that we can move forwards and backwards, let's turn. There are a few ways to turn: pivot, curve, and tank turns. We are going to focus on pivot turns for now. In basketball, players can pivot which is where one of their feet is planted on the ground and the other can turn around them. This means they can only move in a circle but it allows them to turn. Our robots can turn like this as well by stopping one wheel and moving the other forwards or backwards. Make sure your robot has 2-3 wheels to do this. Unicycles work differently and anything with more wheels changes properties to that of a car, which cannot pivot turn.
Below is an example of a tri-bot doing pivot turns around a track.
Now that we can move forwards and backwards, let's turn. There are a few ways to turn: pivot, curve, and tank turns. We are going to focus on pivot turns for now. In basketball, players can pivot which is where one of their feet is planted on the ground and the other can turn around them. This means they can only move in a circle but it allows them to turn. Our robots can turn like this as well by stopping one wheel and moving the other forwards or backwards. Make sure your robot has 2-3 wheels to do this. Unicycles work differently and anything with more wheels changes properties to that of a car, which cannot pivot turn.
Below is an example of a tri-bot doing pivot turns around a track.
Notice that when this robot does a pivot turn, one wheel is at a stop and the other wheel is still turning. Using the Motion Program we can create this. Let's start by writing it out in full again.
Since one of the robot's wheels isn't moving we should get rid of one of the motor blocks that start the motors forwards. Let's get rid of the first C motor block. Before we try this program out we should also get rid of the motor block stopping the C motor as well. Since it is never started, we should not need to stop the C motor. Now the program should look like the one below.
Try downloading and running this program now.
So your robot should have preformed a successful pivot turn. Great Job! Now we will work on controlling it. Notice that the wait block was set to 360 degrees but the robot didn't turn 360 degrees. If it did, the robot would have gone in a full circle. Why did this happen?
It is important to remember that even though we have the wait block set to 360 degrees, it is watching the wheel. So the wheel turned 360 degrees but that doesn't necessarily mean that the whole robot will.
If you are still unsure do the following. Find a marker and make a small dot on the grey rim of your robot's wheel. Now set this dot so that it is at the very bottom. Now run the program and watch it. The dot will go in one full circle around the wheel because the wheel will have turned 360 degrees. But the robot did not turn 360 degrees.
**TBC**
So your robot should have preformed a successful pivot turn. Great Job! Now we will work on controlling it. Notice that the wait block was set to 360 degrees but the robot didn't turn 360 degrees. If it did, the robot would have gone in a full circle. Why did this happen?
It is important to remember that even though we have the wait block set to 360 degrees, it is watching the wheel. So the wheel turned 360 degrees but that doesn't necessarily mean that the whole robot will.
If you are still unsure do the following. Find a marker and make a small dot on the grey rim of your robot's wheel. Now set this dot so that it is at the very bottom. Now run the program and watch it. The dot will go in one full circle around the wheel because the wheel will have turned 360 degrees. But the robot did not turn 360 degrees.
**TBC**