@@ -11,15 +11,15 @@ Atomic Motion Base v1.1 adds INA226 to implement current and voltage detection.
11
11
12
12
Support the following products:
13
13
14
- | Motion |
15
-
16
- | Motion Base v1.1 |
14
+ ================== ==================
15
+ | Motion | | Motion Base v1.1 |
16
+ ================== ==================
17
17
18
18
19
19
UiFlow2 Example:
20
20
--------------------------
21
21
22
- Motion Base
22
+ Motion Base
23
23
^^^^^^^^^^^^^^^^^^^^^^^^
24
24
25
25
Open the |atoms3_lite_motion_base_example.m5f2 | project in UiFlow2.
@@ -67,7 +67,7 @@ Example output:
67
67
68
68
None
69
69
70
- Motion Base v1.1
70
+ Motion Base v1.1
71
71
^^^^^^^^^^^^^^^^^^^^^^^^
72
72
73
73
The example program switches the motor's running speed when the screen button is pressed, and the screen displays the current, voltage, and power.
@@ -86,7 +86,7 @@ Example output:
86
86
**API **
87
87
--------------------------
88
88
89
- Motion
89
+ Motion
90
90
^^^^^^^^^^^^^^^^^^^^^^^^
91
91
92
92
.. class :: base.motion.Motion(i2c, address=0x38)
@@ -112,11 +112,11 @@ Motion
112
112
113
113
.. method :: get_servo_angle(ch)
114
114
115
- Get the angle of the servo.
115
+ Get the angle of the servo.
116
116
117
117
:param int ch: The servo channel. Range: 1~4.
118
118
:returns: Specify the servo angle for the specified channel. Range: 0~180.
119
- :rtype: int
119
+ :rtype: int
120
120
121
121
UiFlow2 Code Block:
122
122
@@ -130,7 +130,7 @@ Motion
130
130
131
131
.. method :: set_servo_angle(ch, angle)
132
132
133
- Set the angle of the servo.
133
+ Set the angle of the servo.
134
134
135
135
:param int ch: The servo channel. Range: 1~4.
136
136
:param int angle: The servo angle. Range: 0~180.
@@ -147,11 +147,11 @@ Motion
147
147
148
148
.. method :: get_servo_pulse(ch)
149
149
150
- Get the pulse of the servo.
150
+ Get the pulse of the servo.
151
151
152
152
:param int ch: The servo channel. Range: 1~4.
153
153
:returns: Specify the servo pulse for the specified channel. Range: 500~2500.
154
- :rtype: int
154
+ :rtype: int
155
155
156
156
UiFlow2 Code Block:
157
157
@@ -165,7 +165,7 @@ Motion
165
165
166
166
.. method :: write_servo_pulse(ch, pulse)
167
167
168
- Write the pulse of the servo.
168
+ Write the pulse of the servo.
169
169
170
170
:param int ch: The servo channel. Range: 1~4.
171
171
:param int pulse: The servo pulse. Range: 500~2500.
@@ -182,11 +182,11 @@ Motion
182
182
183
183
.. method :: get_motor_speed(ch)
184
184
185
- Get the speed of the motor.
185
+ Get the speed of the motor.
186
186
187
187
:param int ch: The motor channel. Range: 1~2.
188
188
:returns: Specify the speed for the specified channel. Range: -127~127.
189
- :rtype: int
189
+ :rtype: int
190
190
191
191
UiFlow2 Code Block:
192
192
@@ -200,7 +200,7 @@ Motion
200
200
201
201
.. method :: set_motor_speed(ch, speed)
202
202
203
- Set motor speed.
203
+ Set motor speed.
204
204
205
205
:param int ch: The motor channel. Range: 1~2.
206
206
:param int speed: The motor speed. Range: -127~127.
@@ -217,10 +217,10 @@ Motion
217
217
218
218
.. method :: read_voltage()
219
219
220
- Read voltage (unit: V).
220
+ Read voltage (unit: V).
221
221
222
222
:returns: The voltage value in volts.
223
- :rtype: float
223
+ :rtype: float
224
224
225
225
.. note ::
226
226
This method is supported only on Motion Base v1.1 and later versions.
@@ -235,12 +235,12 @@ Motion
235
235
236
236
motion.read_voltage()
237
237
238
- .. method :: read_current()
238
+ .. method :: read_current()
239
239
240
- Read current (unit: A).
240
+ Read current (unit: A).
241
241
242
- :returns: The current value in amperes.
243
- :rtype: float
242
+ :returns: The current value in amperes.
243
+ :rtype: float
244
244
245
245
.. note ::
246
246
This method is supported only on Motion Base v1.1 and later versions.
@@ -255,16 +255,16 @@ Motion
255
255
256
256
motion.read_current()
257
257
258
- .. method :: read_power()
258
+ .. method :: read_power()
259
259
260
- Read power (unit: W).
260
+ Read power (unit: W).
261
261
262
- :returns: The power value in watts.
263
- :rtype: float
262
+ :returns: The power value in watts.
263
+ :rtype: float
264
264
265
265
.. note ::
266
266
This method is supported only on Motion Base v1.1 and later versions.
267
-
267
+
268
268
UiFlow2 Code Block:
269
269
270
270
|read_power.png |
0 commit comments