Quote:
|
Contrary to an earlier post, the RC inputs such as rc_dig_in10 do work during autonomous mode, so there's no reason to do it this way. The advice to save the values for later use applies only to OI inputs (knobs and switches, mostly) that you want to use to configure autonomous operation.
|
My mistake. Sorry to confuse...
Your code seems ok at first glance...why don't you put this statement in your Process_data function:
printf("%d\n", (int)rc_dig_in18);
Check the console printout while your program cable is plugged in. Make sure that it changes properly with the switch on your robot.
Too improve efficiency: use else if statements. For example:
if(ticks < 15)
blah;
else if (ticks < 35)
blah;
That will handle your decisions faster...
Sorry again if I confused you eariler.
