TheVarunKaushik commited on
Commit
7c32477
·
verified ·
1 Parent(s): 8fa56f4

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +104 -0
README.md ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "samples": [
3
+ {
4
+ "prompt": "drive forward for a specific distance",
5
+ "code_template": "drivetrain.driveFor(forward, DISTANCE, inches);"
6
+ },
7
+ {
8
+ "prompt": "drive backward for a specific distance",
9
+ "code_template": "drivetrain.driveFor(reverse, DISTANCE, inches);"
10
+ },
11
+ {
12
+ "prompt": "turn left a specific number of degrees",
13
+ "code_template": "drivetrain.turnFor(left, DEGREES, degrees);"
14
+ },
15
+ {
16
+ "prompt": "turn right a specific number of degrees",
17
+ "code_template": "drivetrain.turnFor(right, DEGREES, degrees);"
18
+ },
19
+ {
20
+ "prompt": "spin motor at a specific speed",
21
+ "code_template": "motor1.spin(forward, SPEED, rpm);"
22
+ },
23
+ {
24
+ "prompt": "reverse motor at a specific speed",
25
+ "code_template": "motor1.spin(reverse, SPEED, rpm);"
26
+ },
27
+ {
28
+ "prompt": "stop the drivetrain",
29
+ "code_template": "drivetrain.stop();"
30
+ },
31
+ {
32
+ "prompt": "lift arm for a specific duration",
33
+ "code_template": "armMotor.spin(forward); wait(DURATION, seconds); armMotor.stop();"
34
+ },
35
+ {
36
+ "prompt": "rotate using inertial sensor to a specific angle to the left",
37
+ "code_template": "while(inertialSensor.heading(degrees) < ANGLE) { drivetrain.turn(left); } drivetrain.stop();"
38
+ },
39
+ {
40
+ "prompt": "rotate using inertial sensor to a specific angle to the right",
41
+ "code_template": "while(inertialSensor.heading(degrees) > ANGLE) { drivetrain.turn(right); } drivetrain.stop();"
42
+ },
43
+ {
44
+ "prompt": "spin the flywheel at a specific velocity",
45
+ "code_template": "flywheelMotor.spin(forward, VELOCITY, velocityUnits::rpm);"
46
+ },
47
+ {
48
+ "prompt": "stop the flywheel",
49
+ "code_template": "flywheelMotor.stop();"
50
+ },
51
+ {
52
+ "prompt": "run the intake forward",
53
+ "code_template": "intakeMotor.spin(forward, SPEED, velocityUnits::pct);"
54
+ },
55
+ {
56
+ "prompt": "reverse the intake",
57
+ "code_template": "intakeMotor.spin(reverse, SPEED, velocityUnits::pct);"
58
+ },
59
+ {
60
+ "prompt": "stop the intake",
61
+ "code_template": "intakeMotor.stop();"
62
+ },
63
+ {
64
+ "prompt": "activate the match loader to load a ball",
65
+ "code_template": "matchLoaderMotor.spin(forward, SPEED, velocityUnits::pct); wait(DURATION, seconds); matchLoaderMotor.stop();"
66
+ },
67
+ {
68
+ "prompt": "extend a piston to push an object",
69
+ "code_template": "piston.set(true);"
70
+ },
71
+ {
72
+ "prompt": "retract a piston",
73
+ "code_template": "piston.set(false);"
74
+ },
75
+ {
76
+ "prompt": "toggle a piston's state",
77
+ "code_template": "piston.toggle();"
78
+ },
79
+ {
80
+ "prompt": "run the flywheel for a specific duration then stop",
81
+ "code_template": "flywheelMotor.spin(forward, VELOCITY, velocityUnits::rpm); wait(DURATION, seconds); flywheelMotor.stop();"
82
+ },
83
+ {
84
+ "prompt": "spin the intake and match loader simultaneously to intake and load",
85
+ "code_template": "intakeMotor.spin(forward, INTAKE_SPEED, velocityUnits::pct); matchLoaderMotor.spin(forward, LOADER_SPEED, velocityUnits::pct);"
86
+ },
87
+ {
88
+ "prompt": "calibrate the inertial sensor",
89
+ "code_template": "inertialSensor.calibrate(); while(inertialSensor.isCalibrating()) { wait(100, msec); }"
90
+ },
91
+ {
92
+ "prompt": "set the drivetrain velocity to a specific value",
93
+ "code_template": "drivetrain.setVelocity(SPEED, velocityUnits::pct);"
94
+ },
95
+ {
96
+ "prompt": "set the flywheel velocity for a long-distance shot",
97
+ "code_template": "flywheelMotor.setVelocity(LONG_DISTANCE_SPEED, velocityUnits::rpm); flywheelMotor.spin(forward);"
98
+ },
99
+ {
100
+ "prompt": "set the flywheel velocity for a short-distance shot",
101
+ "code_template": "flywheelMotor.setVelocity(SHORT_DISTANCE_SPEED, velocityUnits::rpm); flywheelMotor.spin(forward);"
102
+ }]
103
+ }
104
+