|
First, because you are using byte-sized variables, you're never going to have values greater than 300. It seems odd, but 255+1=0.
Second, I don't see any gotos. If I understand your code correctly, you are trying to create three separate loops, no? If so, add a quick goto after each serout that sends the code back to the beginning of that section (ie "goto Program1:", etc).
Third, you're going to need to initialize your counters. Just set them all to zero immediately after declaring them. Otherwise, operations like "motor_fwd=motor_fwd+1" have no meaning since there is not motor_fwd to increment the first time through the loop.
--Rob
|