Week 5 – 2019 – Sara

Hi…

This week we finally got the l sensor line follower to work. After getting used to how it was supposed to work it actually seemed quite easy.

This was the code I used last week…

1 sensor line follower

In my last blog I explained how my code worked,but if you haven’t seen it yet here’s a quick explanation. Using the right sensor the robot was supposed to find the right side of the black line,when that was found it was supposed to turn right, then when it detected white it would turn left,making the robot wiggle but follow the line at the same time. The main problem with this code was that the robot was using the right sensor and also trying to follow the right side of the line, and that made it really hard for the robot .

This was how I fixed the code to make it work…

1 sensor line follower
week 4

This is how this code works. The robot still looks for black, but with a difference this time it uses the left sensor. If it does find black then it should turn right 75 degrees with a speed of 75. When it finds white then it should turn left -75 degrees with a speed of 75. The reason I changed it from 50 to 75 was because last time it wasn’t doing any sharp curves, but by changing the angle to 75 it makes the robot do more aggressive turns. The change of speed from 55 to 75 is really only to speed up the process.

I think that the thing that made the biggest change to the two codes is the change from the left sensor to the right sensor.When it was using the right sensor the robot would keep going off the line and onto the white, that’s when it would get lost and go round and round in circles. But when it uses the left sensor the robot doesn’t go past half of the black line and that’s what keeps it going straight.

So, I guess that’s about it.

Bye…