1- if __name__ == "__main__" :
2- from DriveLibraries import *
3- robot = Robot ('robot.cfg' )
4- else :
5- from MenuLib import robot
6- # Write Mission Programs Here ----------------------
7-
8- # Mission Names should be prefaced with a##, where ## is two numbers. These
9- # numbers will not show up on the display, and tell the program what order the
10- # missions should be in; a00 is first, followed by a01, and so on. It is
11- # reccomended that spaces are left between the numbers (a00, a05, a10...), to
12- # allow for future missions.
13-
14- def a00Star ():
15- # Drives a simple 4-pointed star, with arced sides
16- robot .ArcTurn (- 90 , 30 , 30 )
17- robot .ArcTurn (- 90 , 30 , - 30 )
18- robot .ArcTurn (- 90 , 30 , 30 )
19- robot .ArcTurn (- 90 , 30 , - 30 )
20-
21- def a05LineFollow ():
22- # Follows a line for 50 cm, at 50% speed, stopping at end
23- robot .LineFollow (50 , 50 , True )
24-
25- def a10Command_Key ():
26- # Drives in a pattern similar to the Apple command key
27- # o_o
28- # | |
29- # o‾o
30- robot .DriveAtHeading (0 , 50 , 30 , False )
31- robot .ArcTurn (270 , 10 , 30 )
32- robot .DriveAtHeading (270 , 50 , 30 , False )
33- robot .ArcTurn (270 , 10 , 30 )
34- robot .DriveAtHeading (270 * 2 , 50 , 30 , False )
35- robot .ArcTurn (270 , 10 , 30 )
36- robot .DriveAtHeading (270 * 3 , 50 , 30 , True )
1+ if __name__ == "__main__" :
2+ from DriveLibraries import *
3+ robot = Robot ('robot.cfg' )
4+ else :
5+ from MenuLib import robot
6+
7+ # Mission Names should be prefaced with a##, where ## is two numbers. These
8+ # numbers will not show up on the display, and tell the program what order the
9+ # missions should be in; a00 is first, followed by a01, and so on. It is
10+ # reccomended that spaces are left between the numbers (a00, a05, a10...), to
11+ # allow for future missions.
12+
13+ # Write Mission Programs Here ----------------------
14+
15+ def a00Star ():
16+ # Drives a simple 4-pointed star, with arced sides
17+ robot .ArcTurn (- 90 , 30 , 30 )
18+ robot .ArcTurn (- 90 , 30 , - 30 )
19+ robot .ArcTurn (- 90 , 30 , 30 )
20+ robot .ArcTurn (- 90 , 30 , - 30 )
21+
22+ def a05LineFollow ():
23+ # Follows a line for 50 cm, at 50% speed, stopping at end
24+ robot .LineFollow (50 , 50 , True )
25+
26+ def a10Command_Key ():
27+ # Drives in a pattern similar to the Apple command key
28+ # o_o
29+ # | |
30+ # o‾o
31+ robot .DriveAtHeading (0 , 50 , 30 , False )
32+ robot .ArcTurn (270 , 10 , 30 )
33+ robot .DriveAtHeading (270 , 50 , 30 , False )
34+ robot .ArcTurn (270 , 10 , 30 )
35+ robot .DriveAtHeading (270 * 2 , 50 , 30 , False )
36+ robot .ArcTurn (270 , 10 , 30 )
37+ robot .DriveAtHeading (270 * 3 , 50 , 30 , True )
3738 robot .GyroTurn (0 )
0 commit comments