public class Myo extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Myo.Event |
static class |
Myo.LockingPolicy |
static class |
Myo.Unlock |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
PVector |
getAccelerometer()
Get gyroscope values of device.
|
String |
getArm()
Get the type of recognized arm.
|
int[] |
getEmg()
Get raw data of EMG sensors.
|
String |
getFirmware()
Get the firmware of device.
|
PVector |
getGyroscope()
Get gyroscope values of device.
|
PVector |
getOrientation()
Get orientation values of device.
|
String |
getPose()
Get the name of the latest pose.
|
com.thalmic.myo.Hub |
getRawHub()
Get access to the raw instance of class Hub.
|
com.thalmic.myo.Myo |
getRawMyo()
Get access to the raw instance of class Myo.
|
boolean |
hasArm()
Arm recognized?
|
Boolean |
isArmLeft()
Left arm?
|
Boolean |
isArmRight()
Right arm?
|
Myo |
lock()
Force the Myo to lock immediately.
|
void |
pre() |
Myo |
setFrequency(int frequency)
Set the duration to access data.
|
Myo |
setLockingPolicy(Myo.LockingPolicy policy)
Set the locking policy for Myos connected to the Hub.
|
Myo |
setVerbose(boolean verbose)
Print debug information to the console.
|
Myo |
setVerboseLevel(int level)
Set the level of the log level.
|
Myo |
unlock(Myo.Unlock mode)
Unlock the Myo.
|
Myo |
vibrate() |
Myo |
vibrate(int level)
The device will vibrate for haptic feedback.
|
Myo |
withEmg()
Enable EMG mode.
|
Myo |
withoutEmg()
Disable EMG mode.
|
public Myo(PApplet parent)
public void pre()
public void dispose()
public com.thalmic.myo.Myo getRawMyo()
public com.thalmic.myo.Hub getRawHub()
public Myo vibrate(int level)
level
- Set the level of vibration duration [1,2,3].public Myo vibrate()
public Myo lock()
public Myo unlock(Myo.Unlock mode)
mode
- public Myo setLockingPolicy(Myo.LockingPolicy policy)
policy
- public Myo withEmg()
public Myo withoutEmg()
public int[] getEmg()
public Myo setFrequency(int frequency)
frequency
- Time in milliseconds.public String getFirmware()
public String getPose()
public String getArm()
public boolean hasArm()
public Boolean isArmLeft()
public Boolean isArmRight()
public PVector getOrientation()
public PVector getAccelerometer()
public PVector getGyroscope()
public Myo setVerbose(boolean verbose)
verbose
- public Myo setVerboseLevel(int level)
level
- Set the level of the log level [1,2,3]. Three (3) will print lightweight events, too.Processing library MyoForProcessing by Darius Morawiec. (C) 2014