File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -195,28 +195,28 @@ for marker in markers:
195
195
### Setting the mode of a pin
196
196
197
197
~~~~~ 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
201
201
~~~~~
202
202
203
203
### Digital Write
204
204
205
205
You can set the output for a pin of the Ruggeduino:
206
206
207
207
~~~~~ python
208
- R.ruggeduinos[0 ].pins[4 ].mode = OUTPUT
208
+ R.ruggeduinos[' 1234567890 ' ].pins[4 ].mode = OUTPUT
209
209
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 )
212
212
~~~~~
213
213
214
214
### Digital Read
215
215
216
216
You can read a digital value from the pins of the Ruggeduino:
217
217
218
218
~~~~~ python
219
- R.ruggeduinos[0 ].pins[3 ].mode = INPUT
219
+ R.ruggeduinos[' 1234567890 ' ].pins[3 ].mode = INPUT
220
220
221
221
value = R.ruggeduino.pins[3 ].digital_read()
222
222
~~~~~
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ It will look something like this:
24
24
sr.robot3.robot INFO - Found Ruggeduino - 752303138333517171B1
25
25
~~~~~
26
26
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 `
29
29
and ` servos ` , ` ruggeduinos ` is a dictionary accessed by serial number.
30
30
For example, if you had a board whose serial number was "752303138333517171B1",
31
31
you could do this instead:
@@ -68,9 +68,9 @@ An example of how to use this is below:
68
68
# set Ruggeduino pin 2 to output
69
69
R.ruggeduino.pins[2 ].mode = OUTPUT
70
70
# 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
74
74
~~~~~
75
75
76
76
<div class =" warning " >You cannot use pins 0 and 1, as using these would disrupt communications between the Ruggeduino and the Power Board.</div >
You can’t perform that action at this time.
0 commit comments