Skip to content

Commit f4c4cd5

Browse files
committed
Correct ruggeduino references
1 parent a9a24b3 commit f4c4cd5

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

programming/sr/cheat_sheet.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,28 +195,28 @@ for marker in markers:
195195
### Setting the mode of a pin
196196

197197
~~~~~ python
198-
R.ruggeduinos[0].pins[4].mode = OUTPUT
199-
R.ruggeduinos[0].pins[4].mode = INPUT
200-
R.ruggeduinos[0].pins[4].mode = INPUT_PULLUP
198+
R.ruggeduinos['1234567890'].pins[4].mode = OUTPUT
199+
R.ruggeduinos['1234567890'].pins[4].mode = INPUT
200+
R.ruggeduinos['1234567890'].pins[4].mode = INPUT_PULLUP
201201
~~~~~
202202

203203
### Digital Write
204204

205205
You can set the output for a pin of the Ruggeduino:
206206

207207
~~~~~ python
208-
R.ruggeduinos[0].pins[4].mode = OUTPUT
208+
R.ruggeduinos['1234567890'].pins[4].mode = OUTPUT
209209

210-
R.ruggeduinos[0].pins[2].digital_write(True)
211-
R.ruggeduinos[0].pins[2].digital_write(False)
210+
R.ruggeduinos['1234567890'].pins[2].digital_write(True)
211+
R.ruggeduinos['1234567890'].pins[2].digital_write(False)
212212
~~~~~
213213

214214
### Digital Read
215215

216216
You can read a digital value from the pins of the Ruggeduino:
217217

218218
~~~~~ python
219-
R.ruggeduinos[0].pins[3].mode = INPUT
219+
R.ruggeduinos['1234567890'].pins[3].mode = INPUT
220220

221221
value = R.ruggeduino.pins[3].digital_read()
222222
~~~~~

programming/sr/ruggeduinos/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ It will look something like this:
2424
sr.robot3.robot INFO - Found Ruggeduino - 752303138333517171B1
2525
~~~~~
2626

27-
If you have more than one Ruggeduino attached, the `ruggeduinos` object
28-
can be used to control a collection of Ruggeduinos. Similar to `motors`
27+
If you have more than one Ruggeduino attached, the `ruggeduinos` object
28+
can be used to control a collection of Ruggeduinos. Similar to `motors`
2929
and `servos`, `ruggeduinos` is a dictionary accessed by serial number.
3030
For example, if you had a board whose serial number was "752303138333517171B1",
3131
you could do this instead:
@@ -68,9 +68,9 @@ An example of how to use this is below:
6868
# set Ruggeduino pin 2 to output
6969
R.ruggeduino.pins[2].mode = OUTPUT
7070
# set Ruggeduino pin 3 to input
71-
R.ruggeduinos[0].pins[3].mode = INPUT
72-
# set Ruggeduino git commit -m "pin 4 to input and enable pull-up resistor
73-
R.ruggeduinos[0].pins[4].mode = INPUT_PULLUP
71+
R.ruggeduino.pins[3].mode = INPUT
72+
# set Ruggeduino pin 4 to input and enable pull-up resistor
73+
R.ruggeduino.pins[4].mode = INPUT_PULLUP
7474
~~~~~
7575

7676
<div class="warning">You cannot use pins 0 and 1, as using these would disrupt communications between the Ruggeduino and the Power Board.</div>

0 commit comments

Comments
 (0)