Myo Lowlevel API (myo.lowlevel
)¶
This document describes the myo.lowlevel
module.
Myo Objects¶
Hub Objects¶
-
class
myo.lowlevel.ctyping.
Hub
¶ Lowlevel wrapper for a Myo Hub. You should never use this class directly and always use the high-level
myo.Hub
interface instead.-
static
init_libmyo
(lib)¶
-
run
(duration_ms, callback, ud=None)¶ Runs the Hub for duration_ms milliseconds.
Parameters: - duration_ms – The number f milliseconds the hub should run.
- callback – The callback that is invoked for each event.
- ud – User data that is passed to callback
Returns: True if the run was complete, False if callback caused the Hub to stop by returning False or if an exception occured.
-
set_locking_policy
(locking_policy)¶ Sets the myo locking policy for this Hub.
See also: enums.LockingPolicy
-
shutdown
()¶ Shuts the Hub down if it is running. The object is not usable after calling this function.
-
static
Enumerations¶
-
class
myo.lowlevel.enums.
Result
¶ Enumeration for the result of an operation.
-
error
= <Result: [1] error>¶
-
error_invalid_argument
= <Result: [2] error_invalid_argument>¶
-
error_runtime
= <Result: [3] error_runtime>¶
-
success
= <Result: [0] success>¶
-
-
class
myo.lowlevel.enums.
VibrationType
¶ -
long
= <VibrationType: [2] long>¶
-
medium
= <VibrationType: [1] medium>¶
-
short
= <VibrationType: [0] short>¶
-
-
class
myo.lowlevel.enums.
StreamEmg
¶ -
disabled
= <StreamEmg: [0] disabled>¶
-
enabled
= <StreamEmg: [1] enabled>¶
-
-
class
myo.lowlevel.enums.
Pose
¶ -
double_tap
= <Pose: [5] double_tap>¶
-
fingers_spread
= <Pose: [4] fingers_spread>¶
-
fist
= <Pose: [1] fist>¶
-
num_poses
= 6¶
-
rest
= <Pose: [0] rest>¶
-
wave_in
= <Pose: [2] wave_in>¶
-
wave_out
= <Pose: [3] wave_out>¶
-
-
class
myo.lowlevel.enums.
EventType
¶ -
arm_synced
= <EventType: [4] arm_synced>¶
-
arm_unsynced
= <EventType: [5] arm_unsynced>¶
-
bettery_level
= <EventType: [12] bettery_level>¶
-
connected
= <EventType: [2] connected>¶
-
disconnected
= <EventType: [3] disconnected>¶
-
emg
= <EventType: [11] emg>¶
-
locked
= <EventType: [10] locked>¶
-
orientation
= <EventType: [6] orientation>¶
-
paired
= <EventType: [0] paired>¶
-
pose
= <EventType: [7] pose>¶
-
rssi
= <EventType: [8] rssi>¶
-
unlocked
= <EventType: [9] unlocked>¶
-
unpaired
= <EventType: [1] unpaired>¶
-
warmup_completed
= <EventType: [13] warmup_completed>¶
-
-
class
myo.lowlevel.enums.
VersionComponent
¶ -
major
= <VersionComponent: [0] major>¶
-
minor
= <VersionComponent: [1] minor>¶
-
patch
= <VersionComponent: [2] patch>¶
-
-
class
myo.lowlevel.enums.
OrientationIndex
¶ -
w
= <OrientationIndex: [3] w>¶
-
x
= <OrientationIndex: [0] x>¶
-
y
= <OrientationIndex: [1] y>¶
-
z
= <OrientationIndex: [2] z>¶
-
-
class
myo.lowlevel.enums.
HandlerResult
¶ Result of an event handler.
-
continue_
= <HandlerResult: [0] continue_>¶
-
stop
= <HandlerResult: [1] stop>¶
-
-
class
myo.lowlevel.enums.
LockingPolicy
¶ Policy for locking.
-
none
= <LockingPolicy: [0] none>¶
-
standard
= <LockingPolicy: [1] standard>¶
-
-
class
myo.lowlevel.enums.
Arm
¶ -
left
= <Arm: [1] left>¶
-
right
= <Arm: [0] right>¶
-
unknown
= <Arm: [2] unknown>¶
-
-
class
myo.lowlevel.enums.
XDirection
¶ -
toward_elbow
= <XDirection: [1] toward_elbow>¶
-
toward_wrist
= <XDirection: [0] toward_wrist>¶
-
unknown
= <XDirection: [2] unknown>¶
-
-
class
myo.lowlevel.enums.
UnlockType
¶ -
hold
= <UnlockType: [1] hold>¶
-
timed
= <UnlockType: [0] timed>¶
-
-
class
myo.lowlevel.enums.
WarmupState
¶ -
cold
= <WarmupState: [1] cold>¶
-
unknown
= <WarmupState: [0] unknown>¶
-
warm
= <WarmupState: [2] warm>¶
-
-
class
myo.lowlevel.enums.
WarmupResult
¶ -
failed_timeout
= <WarmupResult: [2] failed_timeout>¶
-
success
= <WarmupResult: [1] success>¶
-
unknown
= <WarmupResult: [0] unknown>¶
-
-
myo.lowlevel.enums.
vibration_type_t
¶ alias of
VibrationType
-
myo.lowlevel.enums.
version_component_t
¶ alias of
VersionComponent
-
myo.lowlevel.enums.
orientation_index_t
¶ alias of
OrientationIndex
-
myo.lowlevel.enums.
handler_result_t
¶ alias of
HandlerResult
-
myo.lowlevel.enums.
locking_policy_t
¶ alias of
LockingPolicy
-
myo.lowlevel.enums.
x_direction_t
¶ alias of
XDirection