Skip to content

Commit

Permalink
added new visual example, improved events for detected poses
Browse files Browse the repository at this point in the history
  • Loading branch information
voidplus committed Jan 12, 2015
1 parent 10a53db commit 763c182
Show file tree
Hide file tree
Showing 30 changed files with 158 additions and 70 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The [Myo](https://www.thalmic.com) armband lets you use the electrical activity

## Download

- [Myo for Processing v0.8.0.1](download/MyoForProcessing.zip?raw=true)
- [Myo for Processing v0.8.0.2](download/MyoForProcessing.zip?raw=true)

Note: If you are interested in the newest **beta** implementation, so have a look at the [development branch](https://github.com/voidplus/myo-processing/tree/dev).

Expand Down Expand Up @@ -287,6 +287,11 @@ Don't be shy and feel free to contact me via [Twitter](http://twitter.voidplus.d

## Changelog

### 0.8.0.2

- Added new visual example
- Improved events for detected poses

### 0.8.0.1

- Added support for Myo SDK version 0.8.0
Expand Down
4 changes: 2 additions & 2 deletions download/MyoForProcessing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ paragraph =
# compare different versions of the same library, and check if an update is
# available. You should think of it as a counter, counting the total number of
# releases you've had.
version = 5 # This must be parsable as an int
version = 6 # This must be parsable as an int

# The version as the user will see it. If blank, the version attribute will be
# used here.
prettyVersion = 0.8.0.1 # This is treated as a String
prettyVersion = 0.8.0.2 # This is treated as a String
Binary file modified download/MyoForProcessing.zip
Binary file not shown.
Binary file added examples/e3_application/data/double_tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/e3_application/data/make_a_fist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/e3_application/data/wave_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/e3_application/data/wave_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions examples/e3_application/e3_application.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import de.voidplus.myo.*;

Myo myo;

PImage[] img;
boolean[] active;

void setup() {
size(800, 200);
background(255);
// ...

myo = new Myo(this);
// myo.setVerbose(true);
// myo.setVerboseLevel(4); // Default: 1 (1-4)

myo.setFrequency(10);

img = new PImage[5];
img[0] = loadImage("data/double_tab.png");
img[1] = loadImage("data/spread_fingers.png");
img[2] = loadImage("data/wave_right.png");
img[3] = loadImage("data/wave_left.png");
img[4] = loadImage("data/make_a_fist.png");

active = new boolean[5];
resetImages();
}

void resetImages(){
for(int i = 0; i<5; i++){
active[i] = false;
}
}

void draw() {
background(255);
// ...

for(int i = 0; i<5; i++){
tint(255, (active[i]) ? 100 : 50);
image(img[i], ((140*i)+(i*10))+30, 30, 140, 140);
}
}

void myoOnPose(Myo myo, long timestamp, Pose pose) {

if(!pose.getType().toString().equals("REST")){
resetImages();
}

switch (pose.getType()) {
case REST:
// resetImages();
break;
case FIST:
active[4] = true;
myo.vibrate();
break;
case FINGERS_SPREAD:
active[1] = true;
break;
case DOUBLE_TAP:
active[0] = true;
break;
case WAVE_IN:
active[2] = true;
break;
case WAVE_OUT:
active[3] = true;
break;
default:
break;
}
}

void myoOnLock(Myo myo, long timestamp){
resetImages();
}

void myoOnUnLock(Myo myo, long timestamp){
resetImages();
}
Binary file modified library/MyoForProcessing.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions reference/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>All Classes (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>All Classes (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/constant-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Constant Field Values (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/de/voidplus/myo/Arm.Type.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Arm.Type (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/de/voidplus/myo/Arm.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Arm (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/de/voidplus/myo/Collector.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Collector (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/de/voidplus/myo/Myo.Event.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Myo.Event (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/de/voidplus/myo/Myo.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Myo (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/de/voidplus/myo/Pose.Type.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Pose.Type (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/de/voidplus/myo/Pose.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Pose (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/de/voidplus/myo/package-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>de.voidplus.myo (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/de/voidplus/myo/package-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>de.voidplus.myo (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions reference/de/voidplus/myo/package-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>de.voidplus.myo Class Hierarchy (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
Expand Down Expand Up @@ -81,8 +81,8 @@ <h2 title="Enum Hierarchy">Enum Hierarchy</h2>
<ul>
<li type="circle">java.lang.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><span class="strong">Enum</span></a>&lt;E&gt; (implements java.lang.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;T&gt;, java.io.<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>)
<ul>
<li type="circle">de.voidplus.myo.<a href="../../../de/voidplus/myo/Myo.Event.html" title="enum in de.voidplus.myo"><span class="strong">Myo.Event</span></a></li>
<li type="circle">de.voidplus.myo.<a href="../../../de/voidplus/myo/Arm.Type.html" title="enum in de.voidplus.myo"><span class="strong">Arm.Type</span></a></li>
<li type="circle">de.voidplus.myo.<a href="../../../de/voidplus/myo/Myo.Event.html" title="enum in de.voidplus.myo"><span class="strong">Myo.Event</span></a></li>
<li type="circle">de.voidplus.myo.<a href="../../../de/voidplus/myo/Pose.Type.html" title="enum in de.voidplus.myo"><span class="strong">Pose.Type</span></a></li>
</ul>
</li>
Expand Down
4 changes: 2 additions & 2 deletions reference/deprecated-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Deprecated List (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/help-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>API Help (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions reference/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Index (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion reference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc on Mon Jan 12 22:19:17 CET 2015 -->
<title>Javadocs: MyoForProcessing</title>
<script type="text/javascript">
targetPage = "" + window.location.search;
Expand Down
4 changes: 2 additions & 2 deletions reference/overview-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 05 21:51:09 CET 2015 -->
<!-- Generated by javadoc (version 1.7.0_71) on Mon Jan 12 22:19:17 CET 2015 -->
<title>Class Hierarchy (Javadocs: MyoForProcessing)</title>
<meta name="date" content="2015-01-05">
<meta name="date" content="2015-01-12">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
Expand Down
Loading

0 comments on commit 763c182

Please sign in to comment.