diff --git a/README.md b/README.md index 96b6bb0..2de65a0 100644 --- a/README.md +++ b/README.md @@ -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). @@ -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 diff --git a/download/MyoForProcessing.txt b/download/MyoForProcessing.txt index 3b81732..348ac2e 100644 --- a/download/MyoForProcessing.txt +++ b/download/MyoForProcessing.txt @@ -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 diff --git a/download/MyoForProcessing.zip b/download/MyoForProcessing.zip index b775bd6..a60eee7 100644 Binary files a/download/MyoForProcessing.zip and b/download/MyoForProcessing.zip differ diff --git a/examples/e3_application/data/double_tab.png b/examples/e3_application/data/double_tab.png new file mode 100644 index 0000000..019b85c Binary files /dev/null and b/examples/e3_application/data/double_tab.png differ diff --git a/examples/e3_application/data/make_a_fist.png b/examples/e3_application/data/make_a_fist.png new file mode 100644 index 0000000..ebcc3e2 Binary files /dev/null and b/examples/e3_application/data/make_a_fist.png differ diff --git a/examples/e3_application/data/spread_fingers.png b/examples/e3_application/data/spread_fingers.png new file mode 100644 index 0000000..b2e37ef Binary files /dev/null and b/examples/e3_application/data/spread_fingers.png differ diff --git a/examples/e3_application/data/wave_left.png b/examples/e3_application/data/wave_left.png new file mode 100644 index 0000000..7d835e3 Binary files /dev/null and b/examples/e3_application/data/wave_left.png differ diff --git a/examples/e3_application/data/wave_right.png b/examples/e3_application/data/wave_right.png new file mode 100644 index 0000000..465c7ab Binary files /dev/null and b/examples/e3_application/data/wave_right.png differ diff --git a/examples/e3_application/e3_application.pde b/examples/e3_application/e3_application.pde new file mode 100644 index 0000000..a3df20b --- /dev/null +++ b/examples/e3_application/e3_application.pde @@ -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(); +} diff --git a/library/MyoForProcessing.jar b/library/MyoForProcessing.jar index 8e1b9e0..74870ac 100644 Binary files a/library/MyoForProcessing.jar and b/library/MyoForProcessing.jar differ diff --git a/reference/allclasses-frame.html b/reference/allclasses-frame.html index 1ca6dc0..8055bff 100644 --- a/reference/allclasses-frame.html +++ b/reference/allclasses-frame.html @@ -2,9 +2,9 @@ - + All Classes (Javadocs: MyoForProcessing) - + diff --git a/reference/allclasses-noframe.html b/reference/allclasses-noframe.html index f6ee0f2..b1ab0b6 100644 --- a/reference/allclasses-noframe.html +++ b/reference/allclasses-noframe.html @@ -2,9 +2,9 @@ - + All Classes (Javadocs: MyoForProcessing) - + diff --git a/reference/constant-values.html b/reference/constant-values.html index 9d6aaa4..ec43a62 100644 --- a/reference/constant-values.html +++ b/reference/constant-values.html @@ -2,9 +2,9 @@ - + Constant Field Values (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/Arm.Type.html b/reference/de/voidplus/myo/Arm.Type.html index bdfe9bf..2bf75dc 100644 --- a/reference/de/voidplus/myo/Arm.Type.html +++ b/reference/de/voidplus/myo/Arm.Type.html @@ -2,9 +2,9 @@ - + Arm.Type (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/Arm.html b/reference/de/voidplus/myo/Arm.html index 4829746..88d8fd6 100644 --- a/reference/de/voidplus/myo/Arm.html +++ b/reference/de/voidplus/myo/Arm.html @@ -2,9 +2,9 @@ - + Arm (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/Collector.html b/reference/de/voidplus/myo/Collector.html index 481e2b2..1592582 100644 --- a/reference/de/voidplus/myo/Collector.html +++ b/reference/de/voidplus/myo/Collector.html @@ -2,9 +2,9 @@ - + Collector (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/Myo.Event.html b/reference/de/voidplus/myo/Myo.Event.html index e046843..ea62347 100644 --- a/reference/de/voidplus/myo/Myo.Event.html +++ b/reference/de/voidplus/myo/Myo.Event.html @@ -2,9 +2,9 @@ - + Myo.Event (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/Myo.html b/reference/de/voidplus/myo/Myo.html index 44d4cfc..765e664 100644 --- a/reference/de/voidplus/myo/Myo.html +++ b/reference/de/voidplus/myo/Myo.html @@ -2,9 +2,9 @@ - + Myo (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/Pose.Type.html b/reference/de/voidplus/myo/Pose.Type.html index e16508a..d77241c 100644 --- a/reference/de/voidplus/myo/Pose.Type.html +++ b/reference/de/voidplus/myo/Pose.Type.html @@ -2,9 +2,9 @@ - + Pose.Type (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/Pose.html b/reference/de/voidplus/myo/Pose.html index 7a6f5f9..1dda542 100644 --- a/reference/de/voidplus/myo/Pose.html +++ b/reference/de/voidplus/myo/Pose.html @@ -2,9 +2,9 @@ - + Pose (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/package-frame.html b/reference/de/voidplus/myo/package-frame.html index bd3ed56..fcdaa16 100644 --- a/reference/de/voidplus/myo/package-frame.html +++ b/reference/de/voidplus/myo/package-frame.html @@ -2,9 +2,9 @@ - + de.voidplus.myo (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/package-summary.html b/reference/de/voidplus/myo/package-summary.html index 9a7547d..86b5641 100644 --- a/reference/de/voidplus/myo/package-summary.html +++ b/reference/de/voidplus/myo/package-summary.html @@ -2,9 +2,9 @@ - + de.voidplus.myo (Javadocs: MyoForProcessing) - + diff --git a/reference/de/voidplus/myo/package-tree.html b/reference/de/voidplus/myo/package-tree.html index 062cf8b..4a35fe1 100644 --- a/reference/de/voidplus/myo/package-tree.html +++ b/reference/de/voidplus/myo/package-tree.html @@ -2,9 +2,9 @@ - + de.voidplus.myo Class Hierarchy (Javadocs: MyoForProcessing) - + @@ -81,8 +81,8 @@

Enum Hierarchy