brian.motors
- MotorException
- MotorAlreadyClosedError
- MotorInitializationFailedError
- MotorPortAlreadyInUse
- MotorIsNotReadyError
- MotorIncompatibleTypeError
- MotorNotConnectedError
- get_wait_until_timeout_ms
- set_wait_until_timeout_ms
MotorException class objects
Default motor Exception
MotorAlreadyClosedError class objects
Thrown when trying to access closed Motor
MotorInitializationFailedError class objects
Thrown when motor initialization fails during init
MotorPortAlreadyInUse class objects
Thrown when trying to register motor or motor probe with port mode to already used port
MotorIsNotReadyError class objects
Thrown when trying to operate on a motor that is not ready.
This is the base class for motor readiness exceptions. Catching this exception will also catch MotorIncompatibleTypeError and MotorNotConnectedError.
MotorIncompatibleTypeError class objects
Thrown when a motor of a different type than expected is connected.
Catching this exception will also catch MotorNotConnectedError.
MotorNotConnectedError class objects
Thrown when no motor is connected to the specified port.
Module-level functions
get_wait_until_timeout_ms
Get the current timeout value for wait-until-ready operations in milliseconds.
set_wait_until_timeout_ms
Set the default timeout value for wait-until-ready operations in milliseconds.
This timeout is used by all motor operations that internally wait for the motor to be ready (for example current_angle, coast, rotate_by_angle, and so on).
Arguments:
timeout_ms: Timeout in milliseconds for internal wait-until-ready calls.- positive: wait up to that many milliseconds
- 0 or negative: treated as no wait (immediate return from readiness waits)