View Single Post
  #52   Spotlight this post!  
Unread 17-03-2004, 13:29
10intheCrunch's Avatar
10intheCrunch 10intheCrunch is offline
Who's John V-Neun?
AKA: Alex Baxter
None #0254 (Cheesy Poofs)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: San Jose, CA
Posts: 129
10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough
Send a message via AIM to 10intheCrunch
Re: quick question: TIMERS

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.
__________________
~Alex Baxter
Programming, Arms operation, Team 254