VEX Robotics I Power Points                             Topic 09                    Programming Design Basics             ...
Program sketch 2 – have your robot run through             START        the subroutine for 60 s and then stop.            ...
Program sketch 2 – have your robot run through               START        the subroutine for 60 s and then stop.          ...
WHILE loops can run for certainperiods of timeby using built in     timers
The CORTEX has 4 built in timers called                    T1, T2, T3 and T4WHILE loops can run for certain    These timer...
Change your code and test your robot
Upcoming SlideShare
Loading in …5
×

Programming with sensors bumper switch 2

4,051 views
4,138 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
4,051
On SlideShare
0
From Embeds
0
Number of Embeds
3,163
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Programming with sensors bumper switch 2

  1. 1. VEX Robotics I Power Points Topic 09 Programming Design Basics Bumper Switch Sensing 2www.pedagogics.ca
  2. 2. Program sketch 2 – have your robot run through START the subroutine for 60 s and then stop. Where do we make the changes? IFMove Always Switch TRUEon WHILE not DRIVE LOOP ? infinite pressed FORWARD loop ? FALSE Stop, reverse, 180 END degree turn
  3. 3. Program sketch 2 – have your robot run through START the subroutine for 60 s and then stop. IF TRUE Switch TRUE WHILE DRIVEFALSE not t < 60 s pressed FORWARD ? STOP MOTORS FALSE Stop, reverse, 180 END degree turn
  4. 4. WHILE loops can run for certainperiods of timeby using built in timers
  5. 5. The CORTEX has 4 built in timers called T1, T2, T3 and T4WHILE loops can run for certain These timers all run automatically whileperiods 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
  6. 6. Change your code and test your robot

×