Skip to content

Commit ecf18be

Browse files
committed
Style tweaks
1 parent d092e45 commit ecf18be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tutorials/basic_motor_control.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ while True:
127127
~~~~~
128128

129129
You're familiar with the first few lines; in fact, the only lines you may not be familiar with are the `R.motor_board...` lines.
130-
For a comprehensive reference to the `motor` object, see the `sr.robot3` module's [`motor`](/docs/programming/sr/motors/) page.
130+
For a comprehensive reference to the `motor` object, see the `sr.robot3` module's [Motors](/docs/programming/sr/motors/) page.
131131
But, to summarise:
132132

133133
<div class="info" markdown="1">
@@ -139,6 +139,7 @@ But, to summarise:
139139

140140
So, `R.motor_board.motors[0].power = 0.5` sets the target power of the motor connected to output 0 on the first [motor board](/docs/kit/motor_board)
141141
plugged in to a USB hub to 50% forwards (i.e. a duty-cycle of 0.5 forwards).
142+
142143
As you would expect, then, `R.motor_board.motors[0].power = -0.5` will put the this motor into reverse at 50% power.
143144
`R.motor_board.motors[0].power = 0` will output no power to the motor and stop it.
144145

@@ -213,6 +214,7 @@ while True:
213214

214215
Again, as you've seen most of that before, it shouldn't be too difficult to get your head around.
215216
The `for` loop may be new, however.
217+
216218
The [`for`](https://docs.python.org/tutorial/controlflow.html#for-statements)
217219
loop accepts a Python `list` (a `list`, when `print`ed, appears in square brackets like so: `[1, 2, 3]`).
218220
For a comprehensive introduction to to `list`s, have a look at [this WikiBooks article](https://en.wikibooks.org/wiki/Python_Programming/Lists).
@@ -222,7 +224,7 @@ Here's an example:
222224

223225
~~~~~ python
224226
for i in [1, 2, 3]:
225-
print(i)
227+
print(i)
226228
~~~~~
227229

228230
The above would output:

0 commit comments

Comments
 (0)