... | ... | @@ -90,3 +90,8 @@ switch (counter){ |
|
|
|
|
|
##### Codesnippet 1 [4]
|
|
|
|
|
|
|
|
|
Which basically says, turn right until the left sensor reaches a value that complies with the code cc.isBlack(true), hereafter, start following the line as normal.
|
|
|
|
|
|
### Problems experienced when using two sensors:
|
|
|
When testing it on the ramp, we observed, that when the car goes from the steep area to the plateau, the sensors can no longer measure the correct value of the black line which then causes the car to continue over the edge. Trying to adjust the black threshold which makes the car follow the line but then, when the line splits, it just drives straight forward. If the idea were successful, the lego car should at all times be able to follow the black line, and when it reaches a scenario as in picture 3, a counter should hold information of whether the Lego car is on plateau 1,2,3,.... on so forward, and execute the matching case that should give the Lego car the correct turn directions. Although, since this was not the case, we tried to come up with a solution. |
|
|
\ No newline at end of file |