Author Topic: Line following Robot - junction counting  (Read 3459 times)

0 Members and 1 Guest are viewing this topic.

Offline Yr0gErGTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Line following Robot - junction counting
« on: October 23, 2010, 01:11:22 AM »
Hi, I need to come up with a good C program macro to tell my robot how many junctions it has passed and tell it to stop as accurately as possible and execute turns. I'm using MPLAB and MCC18 Compiler with an array of 5 to 7 sensors arranged in a straight line due to restrictions. The white tapes on a black background are approximately 4cm thick.
My sensors are arranged in a 2-1-2 formations with the edge of the white line in between 2 sensors.
Initially i tried counting the color changes in the sensor but it doesn't seem to be any good. Is there a good C algorithm for this? Some of the junctions are cross-junctions (i.e all the sensors will go white) and T junctions (i.e half including the middle sensor will go white). Please let me know if there is any more information required that i might provide, thanks!


Get Your Ad Here