Line following


What is the behavior?

The behavior is following the line. Following the line is the big behavior mean that is what we want the robot to do it like the big picture. There are smaller behavior the are what make up the big behavior they are like the little things that make the big picture, for example right, left, go forward forever.

How do you program the robot behavior to complete the behavior?

In the image you will see the program for line following. The program is telling the robot go left if there is light and right if it is dark.Which means we have to so how much light there is on the paper and how much light on the line and that is the threshold. We had to fine the threshold by using the light sensor to see how much light there is on the pare and on the line. Then you have to add the light number together and divide them by two. Then when the robot goes on the line then it will know to go left and right. The reason why it has to chose to go left and right is the switch block. The switch block is when the robot has options to go left and right that means if the robot sees light then it will right then if it sees dark then go left. Finally, we have the loop block which is telling the robot to repeat this process.

Picture_1.png

What is a real-world application for the behavior

In the real-world line following can be used in the factory. It can use to for mail carts so a person wouldn't have to move it.
and a dumpster that would be a robot that would go out on the streets to collect garbage. There won't be people pushing the carts or dumpster. It could be used for cars to park straight and pull in the garage. There won't be a more tracks and it will not be permanent. Also, if there is more line following it will be cheaper because you don't need to build tracks. If you have line following then the line is not permanent but if you have a track then it is permanent.