java: fixed grove API and added some examples

Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Andrei Vasiliu
2015-08-12 16:44:30 +03:00
committed by Mihai Tudor Panu
parent a81b1836a3
commit d3e0ae5771
6 changed files with 130 additions and 0 deletions

View File

@ -0,0 +1,19 @@
public class GroveSpeaker_ex {
static {
try {
System.loadLibrary("javaupm_grovespeaker");
} catch (UnsatisfiedLinkError e) {
System.err.println("error in loading native library");
System.exit(-1);
}
}
public static void main (String args[]) throws InterruptedException {
upm_grovespeaker.GroveSpeaker speaker = new upm_grovespeaker.GroveSpeaker(3);
speaker.playAll();
speaker.playSound('c', true, "med");
temp.delete();
}
}