and the analog pin is connected to the arduino's 5v, which means in the serial port it has to show only numbers around 1023.
though i have tried to read serial data from processing, it gives me numbers lower than 60. here is the processing code:
import processing.serial.*;
Serial myPort;
int val;
void setup()
{
String portName = Serial.list()[1]; //com3, same as arduino
myPort = new Serial(this, portName, 9600);
}
void draw()
{
if ( myPort.available() > 0) // If data is available,
{
val = myPort.read(); // read it and store it in val
println(val);
}
}
zdroshnya, thank you very much, this is the hint I needed.
The problem of the normal arduino installation is the name of the file.
It is written "Arduino.jar" and so, I've got every time this error message.
I have renamed the file in "arduino.jar" and the library works well.
The guys of the arduino project should corred this in the "processing-arduino-0017.zip" file.