You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: simulator/simulator_programming.md
+6-21Lines changed: 6 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,8 +73,11 @@ Your robot has one servo board attached, the jaws of the robot are controlled by
73
73
|-------|-----------|
74
74
| 0 | Left Jaw |
75
75
| 1 | Right Jaw |
76
+
| 2 | Lifter |
76
77
77
-
Setting each servo to -1 fully opens the respective jaw.
78
+
Setting each servo to -1 fully opens the respective jaw, setting them to 1 fully opens them.
79
+
80
+
Setting the lifter to -1 fully lowers the lifter, setting it to 1 fully raises it.
78
81
79
82
The servo board has the part code `srXYZ2`, but since only a single servo board is attached it can be referenced as `R.servo_board`.
80
83
@@ -118,8 +121,8 @@ The LEDs are attached to digital pins 3-4:
118
121
119
122
| Pin | Location | Required Mode |
120
123
|-----|---------------|---------------|
121
-
| 3 | Red (left) |`OUTPUT`|
122
-
| 4 | Green (right) |`OUTPUT`|
124
+
| 3 | Red (lower)|`OUTPUT`|
125
+
| 4 | Green (upper) |`OUTPUT`|
123
126
124
127
Using the `digital_write` method, you can set these to True (On) or False (Off).
125
128
@@ -133,24 +136,6 @@ The information returned by the simulated vision API is similar to the physical
133
136
robot's [vision API](/docs/programming/vision/), however there are a number
134
137
of differences as are noted in the vision docs.
135
138
136
-
### Pressure sensing
137
-
138
-
Your simulated robot has two deployable 'fingers' that are able to lift the front of the robot up. These fingers have pressure sensors on their tips, with these you can determine the weight of an object your robot is carrying.
139
-
140
-
The servos to move the fingers are attached to servo pins 2 and 3 in the servo board:
141
-
142
-
| Servo | Location |
143
-
|-------|--------------------|
144
-
| 2 | Left finger servo |
145
-
| 3 | Right finger servo |
146
-
147
-
Once the fingers are deployed, your robot will have reduced manoeuvrability, but you will be able to sense the total pressure on the front of the robot. The pressure measuring devices on the end of the fingers are available as analog inputs on A6 and A7. They are meant to emulate sensors that output a value proportional to pressure, the higher the pressure the higher the voltage reading.
148
-
149
-
| Pin | Location |
150
-
|-----|------------------------------|
151
-
| A6 | Left finger pressure sensor |
152
-
| A7 | Right finger pressure sensor |
153
-
154
139
## Simulated Time
155
140
156
141
In the simulated environment, time advances only at the pace that the simulator
0 commit comments