Skip to content

Commit 30301cc

Browse files
committed
Update the simulator programming for the new robot
1 parent 516d39e commit 30301cc

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

simulator/simulator_programming.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ Your robot has one servo board attached, the jaws of the robot are controlled by
7373
|-------|-----------|
7474
| 0 | Left Jaw |
7575
| 1 | Right Jaw |
76+
| 2 | Lifter |
7677

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.
7881

7982
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`.
8083

@@ -118,8 +121,8 @@ The LEDs are attached to digital pins 3-4:
118121

119122
| Pin | Location | Required Mode |
120123
|-----|---------------|---------------|
121-
| 3 | Red (left) | `OUTPUT` |
122-
| 4 | Green (right) | `OUTPUT` |
124+
| 3 | Red (lower) | `OUTPUT` |
125+
| 4 | Green (upper) | `OUTPUT` |
123126

124127
Using the `digital_write` method, you can set these to True (On) or False (Off).
125128

@@ -133,24 +136,6 @@ The information returned by the simulated vision API is similar to the physical
133136
robot's [vision API](/docs/programming/vision/), however there are a number
134137
of differences as are noted in the vision docs.
135138

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-
154139
## Simulated Time
155140

156141
In the simulated environment, time advances only at the pace that the simulator

0 commit comments

Comments
 (0)