1. VEX Robotics I Power Points
Topic 09
Programming Design Basics
Bumper Switch Sensing 2
www.pedagogics.ca
2. Program sketch 2 – have your robot run through
START the subroutine for 60 s and then stop.
Where do we make the changes?
IF
Move Always Switch TRUE
on WHILE
not
DRIVE
LOOP ?
infinite pressed FORWARD
loop ?
FALSE
Stop, reverse, 180
END degree turn
3. Program sketch 2 – have your robot run through
START the subroutine for 60 s and then stop.
IF
TRUE Switch TRUE
WHILE DRIVE
FALSE not
t < 60 s
pressed FORWARD
?
STOP MOTORS FALSE
Stop, reverse, 180
END degree turn
4. WHILE loops can
run for certain
periods of time
by using built in
timers
5. The CORTEX has 4 built in timers called
T1, T2, T3 and T4
WHILE loops can
run for certain These timers all run automatically while
periods of time the CORTEX is on.
by using built in
timers To reset a timer to zero the ClearTimer
command is used. For timer T1
The Time1 command retrieves the value
of a timer in milliseconds