Offline
Newbie
Karma: 0
Posts: 4
|
 |
« on: September 05, 2012, 01:09:42 pm » |
Hello Forum, I'm just getting into Arduino and I was going through the youtube workshop and had no problems so far. But now, I've installed Processing and wanted to get the arduino_output example running. But I keep getting error messages. The problems seems to be in the setup: void setup() { size(470, 200); println(Arduino.list()); arduino = new Arduino(this, Arduino.list()[0], 57600); for (int i = 0; i <= 13; i++) arduino.pinMode(i, Arduino.OUTPUT); }
The error message is: "IllegalAccessError: tried to access class processing.core.PApplet$RegisteredMethods from class cc.arduino.Arduino$SerialProxy" Has anyone had the same problem? The information on processing.org wasn't a big help. Thanks Ghoti_80
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #1 on: September 05, 2012, 01:47:32 pm » |
Has anyone had the same problem? On what OS? I've never seen that on Windows.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #2 on: September 05, 2012, 05:03:41 pm » |
On what OS? I've never seen that on Windows. I'm using Windows 7
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #3 on: September 06, 2012, 05:36:56 am » |
I'd recommend adding a couple of lines of code: println("COM Ports"); println(Arduino.list()); println("========="); arduino = new Arduino(this, Arduino.list()[0], 57600);
Then, show us what it printed.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #4 on: September 06, 2012, 07:12:07 am » |
I've added the lines and received this output: COM Ports Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 [ 0 ] "COM13" =========
and this error message that I've already received before: Exception in thread "Animation Thread" 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 arduino_output.setup(arduino_output.java:43) at processing.core.PApplet.handleDraw(PApplet.java:2095) at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:197) at processing.core.PApplet.run(PApplet.java:1998) at java.lang.Thread.run(Thread.java:662)
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #5 on: September 06, 2012, 07:17:47 am » |
You're going to need to post your ENTIRE Processing sketch.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #6 on: September 07, 2012, 03:02:19 pm » |
Oh, I'm sorry. Here's the sketch: import processing.serial.*; import cc.arduino.*; Arduino arduino;
color off = color(4, 79, 111); color on = color(84, 145, 158);
int[] values = { Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW, Arduino.LOW };
void setup() { size(470, 200); println("COM Ports"); println(Arduino.list()); println("========="); arduino = new Arduino(this, Arduino.list()[0], 57600); for (int i = 0; i <= 13; i++) arduino.pinMode(i, Arduino.OUTPUT); }
void draw() { background(off); stroke(on); for (int i = 0; i <= 13; i++) { if (values == Arduino.HIGH) fill(on); else fill(off); rect(420 - i * 30, 30, 20, 20); } }
void mousePressed() { int pin = (450 - mouseX) / 30; if (values[pin] == Arduino.LOW) { arduino.digitalWrite(pin, Arduino.HIGH); values[pin] = Arduino.HIGH; } else { arduino.digitalWrite(pin, Arduino.LOW); values[pin] = Arduino.LOW; } }
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 136
Posts: 18998
I don't think you connected the grounds, Dave.
|
 |
« Reply #7 on: September 08, 2012, 03:18:38 pm » |
Code tags would remove the italics.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #8 on: September 09, 2012, 10:59:57 pm » |
I'm having the exact same problem. I ran sample code given with the Arduino library for Processing (Which I'm assuming this is also).
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #9 on: September 10, 2012, 04:25:58 am » |
I'm having the exact same problem. I ran sample code given with the Arduino library for Processing Well, there's just about enough information here to solve your problem. NOT. What Processing application are you running? What Arduino code are you running? What operation system? What versions of Processing and Arduino?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #10 on: September 10, 2012, 07:21:34 pm » |
It's the EXACT same problem as above, same code. The code is an example included in the Arduino library for Processing. I have the latest version of Arduino and Processing software. My Arduino is farily new arduino R3.
The problem is that processing will not attempt serial communication with the Ardunio period. The following code alone for example:
import processing.serial.*;
import cc.arduino.*;
Arduino myArduino;
void setup() { println(myArduino.list()); myArduino = new Arduino(this, myArduino.list()[0], 57600); }
void draw() { println("Hello world"); }
....gives the following error message....
Exception in thread "Animation Thread" 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 sketch_120910a.setup(sketch_120910a.java:32) at processing.core.PApplet.handleDraw(PApplet.java:2095) at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:197) at processing.core.PApplet.run(PApplet.java:1998) at java.lang.Thread.run(Thread.java:680)
Yes, I know the USB is not included in the list. I wasn't attempting to use it because it should have worked anyway.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #11 on: September 12, 2012, 11:15:05 am » |
Folks, I had the same problem and just managed to overcome it. Here's how: Do NOT download the newest version of Processing; rather download the last stable release which is 1.5.1 (the new release is the very source of the bugs, as the Processing has been revised but the Arduino libraries have not). Once you've done that, you will need to update you're RXTX libraries (there is a mismatch, follow the direction contained in the following link: http://forum.processing.org/topic/how-do-i-install-rxtx-2-2pre1-jar-on-windows-7 A couple side notes, I've got a Arduino Mega 2560 communicating with at Windows 7 machine. Best of luck my friends! -Matt
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA
Offline
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #12 on: September 15, 2012, 12:53:21 am » |
Thanks so much, Matt/mellis20! I had even gone to install from the latest in svn, but going back to 1.5.1 worked for me. I'm on Mac OS X 10.8.1. I didn't get any message complaining about RX/TX so kept with what I had.
|
|
|
|
|
Logged
|
|
|
|
|
|