Permalink
Browse files

Added a program to experiment with gesture recognition using the P5 d…

…ata glove, as well as a placeholder for the potential Extend-o-Hand project
  • Loading branch information...
1 parent bce707c commit 7996819a4c2e493a44684313cd3cda5ad00b5016 @joshsh committed Jun 8, 2012
View
@@ -0,0 +1,7 @@
+/target
+.classpath
+.project
+.settings
+.idea
+*.iml
+*~
View
@@ -0,0 +1,20 @@
+Extend-o-Hand copyright (C) 2012 Joshua Shinavier.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>net.fortytwo.extendo</groupId>
+ <artifactId>extend-o-hand</artifactId>
+ <version>0.1</version>
+ <packaging>jar</packaging>
+ <name>Extend-o-Hand</name>
+ <description>instrumented hand peripheral</description>
+
+ <repositories>
+ <repository>
+ <id>fortytwo</id>
+ <name>fortytwo.net Maven repository</name>
+ <url>http://fortytwo.net/maven2</url>
+ </repository>
+ <repository>
+ <id>aduna-repo</id>
+ <name>Aduna repository</name>
+ <url>http://repo.aduna-software.org/maven2/releases</url>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <properties>
+ <junit.version>4.5</junit.version>
+ <ripple.version>0.8-SNAPSHOT</ripple.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.illposed.osc</groupId>
+ <artifactId>javaosc</artifactId>
+ <version>20060402</version>
+ </dependency>
+ <dependency>
+ <groupId>net.fortytwo.ripple</groupId>
+ <artifactId>ripple-core</artifactId>
+ <version>${ripple.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <testSourceDirectory>src/test/java</testSourceDirectory>
+ <directory>target</directory>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
@@ -0,0 +1,30 @@
+package net.fortytwo.extendo.hand;
+
+import com.illposed.osc.OSCListener;
+import com.illposed.osc.OSCMessage;
+import com.illposed.osc.OSCPortIn;
+
+/**
+ * @author Joshua Shinavier (http://fortytwo.net)
+ */
+public class OscPlay {
+ public static void main(final String[] args) throws Exception {
+// OSCPortIn receiver = new OSCPortIn(OSCPort.defaultSCOSCPort());
+ int port = 1331;
+ System.out.println("listening on port " + port);
+ OSCPortIn receiver = new OSCPortIn(port);
+ OSCListener listener = new OSCListener() {
+ public void acceptMessage(java.util.Date time, OSCMessage message) {
+ //System.out.println("Message received: " + message);
+ StringBuilder sb = new StringBuilder();
+ for (Object a : message.getArguments()) {
+ sb.append("\t").append(a);
+ }
+ System.out.println(sb);
+ }
+ };
+// receiver.addListener("/p5glove_data", listener);
+ receiver.addListener("/p5-out", listener);
+ receiver.startListening();
+ }
+}
Oops, something went wrong.

0 comments on commit 7996819

Please sign in to comment.