_api.motorpair – paired motor functions API¶
This module contains the API functions for user interaction with pairs of motors. (Motors linked together in code to make dual-wheel vehicles easy to operate.)
This module is imported by the mindstorms – Mindstorms branding of the user API and spike – Spike Prime branding of the user API modules so that the API can be branded appropriately in documentation (i.e. so that Mindstorms docs can tell you to import mindstorms, and Spike Prime docs can tell you to import spike).
Constants¶
- _api.motorpair._DISCONNECTED_ERROR = One or both of the motors has been disconnected.¶
???
- _api.motorpair._MOTOR_PAIRING_ERROR = The motors could not be paired.¶
???
MotorPair Class¶
- class _api.motorpair.MotorPair(???)¶
???
Methods
- get_default_speed(???)¶
???
- set_default_speed(???)¶
???
- set_stop_action(???)¶
???
- set_motor_rotation(???)¶
???
- start(???)¶
???
- start_at_power(???)¶
???
- start_tank(???)¶
???
- start_tank_at_power(???)¶
???
- stop(???)¶
???
- move(???)¶
???
- move_tank(???)¶
???
- _move_with_speed(???)¶
???
- was_interrupted(???)¶
???
Constants
- BRAKE = brake¶
???
- HOLD = hold¶
???
- COAST = coast¶
???
- CM = cm¶
???
- IN = in¶
???
- DEGREES = degrees¶
???
- SECONDS = seconds¶
???
- ROTATIONS = rotations¶
???
Imports¶
Function
_api.util.wait_for_asyncFunction
system.movewrapper.from_steeringFunction
util.motor.clamp_powerFunction
util.motor.clamp_speedConstant
system.system= <Main System object>Constant
util.constants.PORTS= {‘C’: Port(C), ‘B’: Port(B), ‘D’: Port(D), ‘E’: Port(E), ‘A’: Port(A), ‘F’: Port(F)}