If you are too far away from the line, you need to return very fast and if you are very near to the line you need to just move the robot slightly and then continue forward. When the sensor is on the edge you actually move both motors with the same speed. You move the different motors with different speed depending on how near the sensor is to the edge. It's a different proportion and this algorithm follows the edge between the line and the field. If the sensor is near the line then motor A moves slower. If we have our line over here, we know that if our robot is away from the line, like in this situation, For example, in this program we would use the sensor located on port 1. The basic idea of a proportional algorithm is that you move the different motors with different speeds depending on how far away the sensor is from the line. Let's see how we can implement this program. It works like this.įinds the line and follows it. It's a very smooth algorithm for following lines. ![]() It uses the color sensor and in this video we'll use one of the color sensors. In this video we would implement an algorithm for following a line that's called a proportional algorithm.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |