Chiken:
Alright so I have rewritten my code://servo FSM
switch (servoCase)
{
case 1:
break;
case 2:
servoPos = heading - scan;
if (servoPos < 0)
{
servoPos = 0;
}
servo.write(servoPos);
servoCase = 3;
tms = millis();
break;
...
}
Not very read-ably. What is this 1? And 2? And 3? Are they magic numbers?
Chiken:
Perhaps a switch structure isn't the way this should be happening? Am I asking this arduino to do too much?
The Arduino can do quite a lot.