Compatibility w/Processing Language

The "Triangle" tutorial used by the "Processing" language console, declares "size(320,240) // for the size of the Applet Window".

But when Triangle is run in the Arduino language console, the error reads: "no reference available for "size(320,240)". Further it states: "In function 'void setup()', error: 'size' was not declared in this scope In function 'void draw()':"

Would appreciate any advice as to how to correct the error. Maybe a pointer to the rules that govern those differences.

Thanks in advance, Dave.

Processing is its own IDE and language(from although it looks very similar to arduino's(from The size function isn't meant for the arduino ide window, it's meant for processing.

If you already knew this, maybe you've got a processing sketch that needs an arduino companion sketch. If that's the case look carefully at the example file and see if there's maybe a commented arduino sketch that would include "setup() and loop() functions. That's what would go in the arduino ide.

Clear as mud? sorry, maybe post a link to where you got the sketch.

The following link provides source code for the "Making Things Talk" projects book.

then "click here to download source code"

The triangle source is meant to be run under Processing, not on an Arduino.

An Arduino (Wiring) sketch is based on C/C++and has a "setup" and a "loop". A Processing sketch is based on Java, and has "setup" and "draw".

Besides, having a "size" of anything 320x240 on an Arduino makes very little sense, because it probably doesn't have enough memory.

Can you download "Processing" compiled code to an Arduino board?

Will it execute?

Thanks for defining the two worlds -- really appreciate it.

Can you download "Processing" compiled code to an Arduino board?

If you can find the right button...

Will it execute?