@@ -11,8 +11,8 @@ Each Motor Board can control two motors.
11
11
See the [ Motor Board] ( /docs/kit/motor_board ) hardware page for more details.
12
12
13
13
14
- Accessing the Motor Board
15
- -------------------------
14
+ [ Accessing the Motor Board] ( #access_motor_power ) {#access_motor_power}
15
+ ----------------------------------------------------------------------
16
16
17
17
If there is exactly one Motor Board connected to your robot, it can be accessed using the ` motor_board ` property of the ` Robot ` object.
18
18
@@ -49,8 +49,8 @@ my_other_motor_board = robot.motor_boards["srXYZ1"]
49
49
</div >
50
50
51
51
52
- Setting motor power
53
- -------------------
52
+ [ Setting motor power] ( #setting_motor_power ) {#setting_motor_power}
53
+ ------------------------------------------------------------------
54
54
55
55
Control of your motors is achieved by setting a power output from one of the channels on your Motor Boards.
56
56
Valid values are between -1 and 1 inclusive.
@@ -106,8 +106,9 @@ robot.motor_boards["srABC1"].motors[1].power = 0
106
106
This will depend on how you have positioned your motors as well as how they have been wired to the Motor Board.
107
107
</div >
108
108
109
- Getting the current motor power
110
- -------------------------------
109
+
110
+ [ Getting the current motor power] ( #current_motor_power ) {#current_motor_power}
111
+ ------------------------------------------------------------------------------
111
112
112
113
You can read the current power value for a motor using the same field:
113
114
@@ -116,8 +117,9 @@ You can read the current power value for a motor using the same field:
116
117
print (robot.motor_boards[" srABC1" ].motors[0 ].power)
117
118
~~~~~
118
119
119
- Special Values
120
- --------------
120
+
121
+ [ Special Values] ( #special_values ) {#special_values}
122
+ ---------------------------------------------------
121
123
122
124
In addition to the numeric values, there are two special constants that can be used:
123
125
- ` BRAKE `
@@ -143,8 +145,8 @@ robot.motor_boards["srABC1"].motors[0].power = COAST
143
145
~~~~~
144
146
145
147
146
- Motor currents
147
- --------------
148
+ [ Motor currents] ( #motor_currents ) {#motor_currents}
149
+ ---------------------------------------------------
148
150
149
151
The Motor Board can also measure the current being drawn by each of the ports on the board.
150
152
This value is measured in amps.
0 commit comments