Pages: [1]   Go Down
Author Topic: Processing .. Getting Started  (Read 702 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm trying to work through this example : http://www.arduino.cc/en/Tutorial/Graph 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 ?
Logged

Austin, TX
Offline Offline
Jr. Member
**
Karma: 1
Posts: 94
Shh! I am hunting wabbit. Killlll the wabbit!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: June 15, 2007, 11:12:55 am by wandrson » Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yea, the Processing code should be run in Processing, which you can download from: http://processing.org/download/index.html

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I've got it all working now smiley
Logged

Pages: [1]   Go Up
Jump to: