Where is the math while turning? Is there any math involved? Should there be?
- 27 Mar 2017
Turn to 180 degrees
Make the robot turn to 180 degrees. This would involve experimenting with different values for power and wait. You could try to do a calculation depending on the size of the wheels and the distance between the wheels, but you could also just experiment. Try to find the correct values.
Note for the baterry
The battery will have a great effect on your values and as the battery drains so will the value change.
Let's talk about experimenting with the different turns of this robot. Now, you can build a mathematical module but you can also do some tries and some runs and in this way find the correct values. For example, this here is a task where you should make the robot turn to 180 degrees. Like this. And you should find the values for the different motors for turning 180 degrees.
We start with the program that makes the robot move forward and what we should do is experiment. For example, we can rotate the motor connected on port 2 with power 50 and we can rotate the other motor in the reverse direction. And we wait for a number of milliseconds. For example, if 1000 is not enough, we can wait for 2000 milliseconds which is 2 seconds. Let's experiment and see how the robot behaves with these values. If we now start the robot, we would see it turning.
Let's do it again because we had the cable.
Now, the robot rotates to more than 180 degrees So, we must reduce the value for waiting a number of seconds. Experiment. There are also a number of other tasks. Try to solve them before moving forward.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons