Pages: [1]   Go Down
Author Topic: Error when writing program on processing 2.0b7  (Read 1292 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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:
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?
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 615
Posts: 49412
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: