Thread: how do you...
View Single Post
  #10   Spotlight this post!  
Unread 25-01-2004, 08:41
Obi's Avatar
Obi Obi is offline
Registered User
#0870
 
Join Date: Jan 2004
Location: Southold
Posts: 18
Obi is an unknown quantity at this point
Re: how do you...

Quote:
Originally Posted by echos
here is some rather straight forward code, simular to previous years stuff.

Code:
 unsigned int counter;
 
 if(autonmous_code)
 	{
 	if(counter <= 20)
 		{
 		pwm01 = pwm02 = 255;
 		}
 
 	  else if(counter >= 21 && counter <= 100 && counter != 99)
 		{
 		pwm01 = 255;
 		pwm02 = (pwm01 -= 254);
 		}
 	  else
 		{
 		die(void);
 		}
 
 	counter++;
 	}
Our program (Team #870) looks like that, except that we have counter = 40 x the MS (26.2, but we use 25). We then output that to the IFI loader screen, and we get a nice display, every second, declaring the amount of seconds, whether in Auton mode or Practice.