Page 2 of 2

Re: Line Following with HiTechnic Sensor Multiplexer

Posted: 23 Feb 2012, 14:37
by hassenplug
creator1 wrote:However it will sometimes "forget" about the outermost light sensors which is used to detect tight curve and right angle.
This is where you can begin to experiment with every single thing about the robot hardware and software.

It can get complex, because one change can effect other things. For example, if you find the perfect way to mount the light sensors, then change the software, you may find the light sensors need to move to a new location.

Here are a few things you can change with the hardware:
1) Distance between the drive wheels
2) Distance from the wheels to the light sensors
3) Location of the "inner" light sensors vs the "outer" sensors.
(A) Adjust how far out the outer sensors are
(B) Adjust the forward/backward location of the outer sensors

And, the software can get as complex as you want. One flaw with your current strategy is that you're assuming if the line is not under one of the sensors, it's between the two inner sensors. As you've noticed, that logic has a problem with sharp turns.

You may want to think about what the robot should do when the outer sensors see the line. One option is to turn while they see the line, but if the robot is going fast enough to go right over, it will only twitch as it passes over the line. Maybe when the outer sensors see the line, the robot should turn until the INNER sensors see the line.

I highly recommend just playing around, and see what happens.

Steve