@@ -37,7 +37,7 @@ robot.wait_start() # wait for the start button
37
37
38
38
### Initialisation with extra logging
39
39
40
- You can also tell the robot to print extra logging information, although this is quite noisy .
40
+ You can also tell the robot to print extra logging information, although this will create a lot of logs .
41
41
42
42
~~~~~ python
43
43
robot = Robot(debug = True )
@@ -154,7 +154,7 @@ You can also set the position to `0`, which is the approximate centre.
154
154
It can sometimes be useful to save a photo of what markers the robot can see:
155
155
156
156
~~~~~ python
157
- robot.camera.save(" my-photo.png " ) # Save my-photo.png to the USB drive
157
+ robot.camera.save(" my-photo.jpg " ) # Save my-photo.jpg to the USB drive
158
158
~~~~~
159
159
160
160
### Capturing an openCV array
@@ -210,25 +210,27 @@ robot.ruggeduino.pins[4].mode = INPUT_PULLUP
210
210
You can set the output for a pin of the Arduino:
211
211
212
212
~~~~~ python
213
- robot.ruggeduino.pins[4 ].mode = OUTPUT
213
+ robot.ruggeduino.pins[2 ].mode = OUTPUT
214
214
215
215
robot.ruggeduino.pins[2 ].digital_write(True )
216
216
robot.ruggeduino.pins[2 ].digital_write(False )
217
217
~~~~~
218
218
219
219
### Digital Read
220
220
221
- You can read a digital value from the pins of the Ruggeduino :
221
+ You can read a digital value from the pins of the Arduino :
222
222
223
223
~~~~~ python
224
224
robot.ruggeduino.pins[3 ].mode = INPUT
225
+ robot.ruggeduino.pins[5 ].mode = INPUT_PULLUP
225
226
226
227
value = robot.ruggeduino.pins[3 ].digital_read()
228
+ value = robot.ruggeduino.pins[5 ].digital_read()
227
229
~~~~~
228
230
229
231
### Analogue Read
230
232
231
- You can read an analogue value from the analogue pins of the Ruggeduino :
233
+ You can read an analogue value from the analogue pins of the Arduino :
232
234
233
235
~~~~~ python
234
236
robot.ruggeduino.pins[A0].mode = INPUT
@@ -240,28 +242,28 @@ value = robot.ruggeduino.pins[A0].analogue_read()
240
242
241
243
The API also makes some information about where your code is running
242
244
243
- ### Starting Zone for a match
245
+ ### Starting zone for a match
244
246
245
247
~~~~~ python
246
248
zone = robot.zone # -> 0, 1, 2, or 3
247
249
~~~~~
248
250
249
- ### Robot Mode
251
+ ### Robot mode
250
252
251
253
This is set to ` COMP ` when your robot is in a match.
252
254
253
255
~~~~~ python
254
256
robot_mode = robot.mode # -> DEV or COMP
255
257
~~~~~
256
258
257
- ### USB stick Path
259
+ ### USB stick path
258
260
259
261
This is the path to where your USB stick is mounted.
260
262
261
263
You can use this to save files and information to the drive.
262
264
263
265
~~~~~ python
264
- usb_key_path = robot.usbkey # -> pathlib.Path
266
+ usb_key_path = robot.usbkey
265
267
~~~~~
266
268
267
269
### Is simulated
0 commit comments