View Single Post
  #3   Spotlight this post!  
Unread 17-03-2003, 13:05
DKolberg DKolberg is offline
Mentor Iron Giants
AKA: David Kolberg
FRC #5069 (Iron Giants)
Team Role: Mentor
 
Join Date: May 2002
Rookie Year: 2000
Location: South Bend
Posts: 44
DKolberg has a spectacular aura aboutDKolberg has a spectacular aura about
Another method is to develop a delay routine that can be called a number of times. You can change the code to the simple serial in and out with nothing else, set up a loop to call the delay n times. Monitor the delay_t value and keep increasing n until a one is picked up in the delay_t. Now you can calculate the time of the delay routine by taking the inverse of 38*n. From this you can just check how much time is remaining in your code by adding a loop after the serial out to delay n times and up n until the delay_t goes to 1. This will tell you how much room you have left. Just remember to comment out the loop before competition.