View Single Post
  #53   Spotlight this post!  
Unread 17-03-2004, 13:36
Xufer's Avatar
Xufer Xufer is offline
8 Seasons and as stable as ever
AKA: Working, 2/4 degrees complete still schooling...
FRC #1740 (The Cyber Colonels)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Waterford, CT
Posts: 231
Xufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to behold
Send a message via AIM to Xufer Send a message via MSN to Xufer Send a message via Yahoo to Xufer
Re: quick question: TIMERS

Quote:
Originally Posted by 10intheCrunch
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.
i stuck in the printf statement and it shows the switch on and off depending on the position, so i know its not the switch its something i did.
__________________


If saftey is first and i put FIRST ahead of everything, then i must be the safest guy in the world.

Team 521 Alumni -- Team 1740 Mentor-- Go Go 1740!
Sometimes I think I've been doing this too long and other times I think I haven't done this enough... but all the times I'm sure I'm crazy
Photonics, It's Your Future