The document discusses using timers in programming robots, noting that robots must stop responding to commands after a set time period like 2 minutes to avoid disqualification. It explains that the wait1Msec command can be used to create timers, and that robots are equipped with 4 internal timers, T1-T4. It provides instructions to write a program that uses a timer, including loading a sample program, writing a while loop with a 15 second time period, setting motors to zero after the loop, and changing the time limit to 90 seconds.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
55 views10 pages
06robotics - Timers
The document discusses using timers in programming robots, noting that robots must stop responding to commands after a set time period like 2 minutes to avoid disqualification. It explains that the wait1Msec command can be used to create timers, and that robots are equipped with 4 internal timers, T1-T4. It provides instructions to write a program that uses a timer, including loading a sample program, writing a while loop with a 15 second time period, setting motors to zero after the loop, and changing the time limit to 90 seconds.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10
Programming - Timers
Intro to Robotics
Time and Timers
Lets say the rules for the game state that you only have 2 minutes from the starting signal to control your robot, and then your robot must STOP responding to commands or face disqualification. Is your robot tournament ready?
wait1Msec ( ) You might think you understand how to use the wait1Msec(time) command, but the question is where do you put it in the code?
Timers
Your robot is equipped
with 4 timers, T1-T4.
The time in the while loops
condition is on milliseconds.
Timers are in the condition
Write your program
Load up Dual Joystick Control from the
sample programs and rename it to Mines with Timers. Write a program with a 15 second time period. After the while loop set your motors to zero. Complete the maze in under 15 seconds. After completing the maze change the time to 90 seconds, then save.