Skip to content

Commit 7fe63c1

Browse files
committed
Add LED docs
1 parent 08ba8f0 commit 7fe63c1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

competition-simulator/programming.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,21 @@ Analogous to ultrasound sensors, distance sensors allow you to retrieve the dist
7676

7777
These are shown as blue coloured blocks on the robot. The `analogue_read` method will return the distance in metres, however only measure up to 30cm.
7878

79+
#### LEDs
80+
81+
The LEDs are attached to digital pins 7-12:
82+
83+
| Pin | Location |
84+
|-----|----------|
85+
| 7 | Red (right) |
86+
| 8 | Green (right) |
87+
| 9 | Blue (right) |
88+
| 10 | Blue (left) |
89+
| 11 | Green (left) |
90+
| 12 | Red (left) |
91+
92+
Using the `digital_write` method, you can set these to True (On) or False (Off).
93+
7994
### Camera
8095

8196
Your robot has a camera, which is attached to the top of your robot. A live preview of what the camera sees is shown in the top-left corner. The vision system uses Webots' object recognition, rather than [fiducial markers]({{ site.baseurl }}/programming/sr/vision/markers/).

0 commit comments

Comments
 (0)