Processing .. Getting Started


I'm trying to work through this example : and I can't seem to get the processing code working. When I paste it into the Arduino Java client, it fails to compile and I get an error : 'import' does not name a type.

I assume I'm missing some steps as to how and where the processing code gets run, could anybody tell me how I can get this running ?

The processing serial library appears to have a slightly different syntax.

For example where processing says

println("Available Serial ports:");

arduino would say

Serial.println("Available Serial ports:);

A more significant difference is that the arduino Serial library has only one port so some of the functionality from processing is not available / applicable.

For instance the port = new Serial...

is just Serial.begin(baud rate) in arduino

while the processing

Serial.list() method simply doesn't exist in arduino since there is only one port.

A closer view of the example you mentioned indicates that the Graph processing code is designed to be run on desktop computer running the processing environment while the arduino runs the small section of code at the top of the example. Not sure where you can find the processing IDE but that code will not run within the arduino IDE.

Yea, the Processing code should be run in Processing, which you can download from:

I'll add an explanation of that to the pages for the examples.

Thanks, I've got it all working now :)