Go Down

Topic: Error when writing program on processing 2.0b7 (Read 1 time) previous topic - next topic

JackJackson

Hi everybody! I'm a newbie and now trying to work on my project. I'm trying to control my freeduino 1.16 board by processing 2.0b7 (I use arduino library for processing). When I'm trying to run this simple code:

Code: [Select]
import processing.serial.*;
import cc.arduino.*;

Arduino arduino;
int ledPin = 13;

void setup()
{
  println(Arduino.list());
  arduino = new Arduino(this, Arduino.list()[0], 57600);    // <--here the error
  arduino.pinMode(ledPin, Arduino.OUTPUT);
}

void draw()
{
  arduino.digitalWrite(ledPin, Arduino.HIGH);
  delay(1000);
  arduino.digitalWrite(ledPin, Arduino.LOW);
  delay(1000);
}


i receve this error message:

Code: [Select]
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
[0] "COM3"
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_input.setup(arduino_input.java:28)
at processing.core.PApplet.handleDraw(PApplet.java:2117)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:193)
at processing.core.PApplet.run(PApplet.java:2020)
at java.lang.Thread.run(Thread.java:662)


I wasted a couple hours reading manuals but still dont understand what is wrong. Could anyone explain me whats wrong?

PeterH


I wasted a couple hours reading manuals but still dont understand what is wrong. Could anyone explain me whats wrong?


You're in the wrong place. This is an Arduino forum; your question is about Processing so you should ask it on a Processing forum.
I only provide help via the forum - please do not contact me for private consultancy.

PaulS

See that b in the version number? That stands for buggy. Oh, wait, I meant beta. It means that it is not ready for prime time. Go back the last stable version that plays well with the Arduino - 1.5.1.

JackJackson


See that b in the version number? That stands for buggy. Oh, wait, I meant beta. It means that it is not ready for prime time. Go back the last stable version that plays well with the Arduino - 1.5.1.

Thank you, it works fine now.

Go Up