Skip to content

Commit e452019

Browse files
committed
add input modes for analog pins
1 parent 259aeb2 commit e452019

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

simulator/simulator_programming.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ This is shown as a red coloured block on the robot. Using the `digital_read` me
103103

104104
Analogous to ultrasound sensors, distance sensors allow you to retrieve the distance between your robot and an object. These are attached to analog pins A0-A5:
105105

106-
| Pin | Location |
107-
|-----|-------------|
108-
| A0 | Front Left |
109-
| A1 | Front Right |
110-
| A2 | Left |
111-
| A3 | Right |
112-
| A4 | Front |
113-
| A5 | Back |
106+
| Pin | Location | Required Mode |
107+
|-----|-------------|---------------|
108+
| A0 | Front Left | `INPUT` |
109+
| A1 | Front Right | `INPUT` |
110+
| A2 | Left | `INPUT` |
111+
| A3 | Right | `INPUT` |
112+
| A4 | Front | `INPUT` |
113+
| A5 | Back | `INPUT` |
114114

115115
These are shown as blue boards with silver transceivers on the robot. The `analog_read` method will return the distance in metres. They can see in a narrow cone up to a maximum of about 2m away.
116116
Since these sensors rely on echoes being reflected back from objects, if the angle of incidence between the sensor's pulse and the contacted surface exceeds 22.5 degrees then the sensor will be unable to detect the object.

0 commit comments

Comments
 (0)