@@ -131,11 +131,11 @@ You're familiar with the first few lines; in fact, the only lines you may not be
131
131
For a comprehensive reference to the ` motor ` object, see the ` sr.robot3 ` module's [ ` motor ` ] ( /docs/programming/sr/motors/ ) page.
132
132
But, to summarise:
133
133
134
- <div class =" info " >
135
- `R.motor_board.motors[0].power = x` will set the power of the motor connected to output 0 (the `motors[0]` part)
136
- on the first [motor board](/docs/kit/motor_board) (the `motor_board` part)
137
- plugged in to a USB hub to `x`, where `x` is a value between `-1` and `1`,
138
- inclusive — in other words: `-1` ≤ `x` ≤ `1`.
134
+ <div class =" info " markdown = " 1 " >
135
+ ` R.motor_board.motors[0].power = x ` will set the power of the motor connected to output 0 (the ` motors[0] ` part)
136
+ on the first [ motor board] ( /docs/kit/motor_board ) (the ` motor_board ` part)
137
+ plugged in to a USB hub to ` x ` , where ` x ` is a value between ` -1 ` and ` 1 ` ,
138
+ inclusive &mdash ; in other words: ` -1 ` &le ; ` x ` &le ; ` 1 ` .
139
139
</div >
140
140
141
141
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 )
@@ -146,10 +146,10 @@ As you would expect, then, `R.motor_board.motors[0].power = -0.5` will put the t
146
146
So, if you put the above code on your robot,
147
147
you should be able to see a motor spin forwards, stop, spin backwards, stop, and then repeat...
148
148
149
- <div class =" info " >
150
- If you find that the motor doesn't turn when you run the above code,
151
- check that you've got all the cables connected to the right places,
152
- in particular note that the motor board has _two_ outputs.
149
+ <div class =" info " markdown = " 1 " >
150
+ If you find that the motor doesn't turn when you run the above code,
151
+ check that you've got all the cables connected to the right places,
152
+ in particular note that the motor board has _ two_ outputs.
153
153
</div >
154
154
155
155
### Changing the Speed
0 commit comments