de.voidplus.myo

## Class Myo

- java.lang.Object
- - de.voidplus.myo.Myo

-     public class Myo
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Myo.Event`
    `static class` | `Myo.LockingPolicy`
    `static class` | `Myo.Unlock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Myo(PApplet parent)`

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Myo

          public Myo(PApplet parent)

  - ### Method Detail

    - #### pre

          public void pre()

    - #### dispose

          public void dispose()

    - #### getRawMyo

          public com.thalmic.myo.Myo getRawMyo()

      Get access to the raw instance of class Myo.
      Returns:
        Active instance of class com.thalmic.myo.Myo.

    - #### getRawHub

          public com.thalmic.myo.Hub getRawHub()

      Get access to the raw instance of class Hub.
      Returns:
        Active instance of class com.thalmic.myo.Hub.

    - #### vibrate

          public Myo vibrate(int level)

      The device will vibrate for haptic feedback.
      Parameters:
        `level` - Set the level of vibration duration [1,2,3].
      Returns:

    - #### vibrate

          public Myo vibrate()

    - #### lock

          public Myo lock()

      Force the Myo to lock immediately.
      Returns:

    - #### unlock

          public Myo unlock(Myo.Unlock mode)

      Unlock the Myo.
      Parameters:
        `mode` -
      Returns:

    - #### setLockingPolicy

          public Myo setLockingPolicy(Myo.LockingPolicy policy)

      Set the locking policy for Myos connected to the Hub.
      Parameters:
        `policy` -
      Returns:

    - #### withEmg

          public Myo withEmg()

      Enable EMG mode.
      Returns:

    - #### withoutEmg

          public Myo withoutEmg()

      Disable EMG mode.
      Returns:

    - #### getEmg

          public int[] getEmg()

      Get raw data of EMG sensors.
      Returns:

    - #### setFrequency

          public Myo setFrequency(int frequency)

      Set the duration to access data.
      Parameters:
        `frequency` - Time in milliseconds.
      Returns:

    - #### getFirmware

          public String getFirmware()

      Get the firmware of device.
      Returns:

    - #### getPose

          public String getPose()

      Get the name of the latest pose.
      Returns:
        Name of latest pose.

    - #### getArm

          public String getArm()

      Get the type of recognized arm.
      Returns:
        Type of recognized arm.

    - #### hasArm

          public boolean hasArm()

      Arm recognized?
      Returns:

    - #### isArmLeft

          public Boolean isArmLeft()

      Left arm?
      Returns:

    - #### isArmRight

          public Boolean isArmRight()

      Right arm?
      Returns:

    - #### getOrientation

          public PVector getOrientation()

      Get orientation values of device.
      Returns:
        Orientation as PVector, where 'x' is the 'roll' value, 'y' is the 'pitch' value and 'z' the 'yaw' value.

    - #### getAccelerometer

          public PVector getAccelerometer()

      Get gyroscope values of device.
      Returns:

    - #### getGyroscope

          public PVector getGyroscope()

      Get gyroscope values of device.
      Returns:

    - #### setVerbose

          public Myo setVerbose(boolean verbose)

      Print debug information to the console.
      Parameters:
        `verbose` -
      Returns:

    - #### setVerboseLevel

          public Myo setVerboseLevel(int level)

      Set the level of the log level.
      Parameters:
        `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