I am working on using minim sound detection and my arduino to control my christmas lights this year, and I found an instructable that used the mimim library to control leds hooked up to the arduino. However, whenever I try to run it I get a bunch of errors.
if (!hasInput && (abs(src.left.get(i)) > tol || abs(src.right.get(i)) > tol)){
hasInput = true;
}
}
}
void resetPins(){
for (int i=0; i<ledPins.length; i++){
arduino.digitalWrite(ledPins[i], Arduino.LOW);
}
}
void stop(){
resetPins();
if (mode == "mic"){
in.close();
}
minim.stop();
super.stop();
}
And here are the errors I get,
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Exception in thread "Animation Thread" java.lang.RuntimeException: java.lang.IllegalAccessError: tried to access class processing.core.PApplet$RegisteredMethods from class cc.arduino.Arduino$SerialProxy
at processing.opengl.PGL.requestDraw(PGL.java:1021)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1526)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalAccessError: tried to access class processing.core.PApplet$RegisteredMethods from class cc.arduino.Arduino$SerialProxy
at cc.arduino.Arduino$SerialProxy.<init>(Arduino.java:119)
at cc.arduino.Arduino.<init>(Arduino.java:168)
at cc.arduino.Arduino.<init>(Arduino.java:152)
at sketch_121118a.setup(sketch_121118a.java:73)
at processing.core.PApplet.handleDraw(PApplet.java:2103)
at processing.opengl.PGL$PGLListener.display(PGL.java:2595)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177)
at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:928)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:945)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Already called beginDraw().
Exception in thread "AWT-EventQueue-0" java.lang.IllegalAccessError: processing/core/PApplet$RegisteredMethods
at cc.arduino.Arduino$SerialProxy.<init>(Arduino.java:119)
at cc.arduino.Arduino.<init>(Arduino.java:168)
at cc.arduino.Arduino.<init>(Arduino.java:152)
at sketch_121118a.setup(sketch_121118a.java:73)
at processing.core.PApplet.handleDraw(PApplet.java:2103)
at processing.opengl.PGL$PGLListener.display(PGL.java:2595)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177)
at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:928)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:827)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:415)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:515)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:308)
at java.awt.Component.dispatchEventImpl(Component.java:4729)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:621)
at java.awt.EventQueue$2.run(EventQueue.java:619)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)