Loading...

Reference.Comparison History

Show minor edits - Show changes to markup

June 15, 2007, at 06:38 PM by David A. Mellis -
Changed lines 3-4 from:

The Arduino language (based on Wiring) is implemented in C, and therefore has some differences from the Processing language, which is based on Java.

to:

The Arduino language (based on Wiring) is implemented in C/C++, and therefore has some differences from the Processing language, which is based on Java.

June 15, 2007, at 06:38 PM by David A. Mellis - updating serial examples to current api
Changed line 30 from:

(:cellnr:) printString("hello world");
printNewline();

to:

(:cellnr:) Serial.println("hello world");

Changed line 32 from:

(:cellnr bgcolor=#999999:) int i = 5;
printInteger(i);
printNewline();

to:

(:cellnr bgcolor=#999999:) int i = 5;
Serial.println(i);

Changed line 34 from:

(:cellnr:) int i = 5;
printString("i = ");
printInteger(i);
printNewline();

to:

(:cellnr:) int i = 5;
Serial.print("i = ");
Serial.print(i);
Serial.println();

November 04, 2006, at 01:45 PM by David A. Mellis -
Added lines 1-37:

Arduino/Processing Language Comparison

The Arduino language (based on Wiring) is implemented in C, and therefore has some differences from the Processing language, which is based on Java.

Arrays

(:table width=75% cellspacing=0 cellpadding=5:) (:cellnr width=50% bgcolor=#999999:) Arduino (:cell width=50% bgcolor=#CCCCCC:) Processing (:cellnr:) int bar[8];
bar[0] = 1; (:cell:) int[] bar = new int[8];
bar[0] = 1; (:cellnr bgcolor=#999999:) int foo[] = { 0, 1, 2 }; (:cell bgcolor=#CCCCCC:) int foo[] = { 0, 1, 2 };
or
int[] foo = { 0, 1, 2 }; (:tableend:)

Loops

(:table width=75% cellspacing=0 cellpadding=5:) (:cellnr width=50% bgcolor=#999999:) Arduino (:cell width=50% bgcolor=#CCCCCC:) Processing (:cellnr:) int i;
for (i = 0; i < 5; i++) { ... } (:cell:) for (int i = 0; i < 5; i++) { ... } (:tableend:)

Printing

(:table width=75% cellspacing=0 cellpadding=5:) (:cellnr width=50% bgcolor=#999999:) Arduino (:cell width=50% bgcolor=#CCCCCC:) Processing (:cellnr:) printString("hello world");
printNewline(); (:cell:) println("hello world"); (:cellnr bgcolor=#999999:) int i = 5;
printInteger(i);
printNewline(); (:cell bgcolor=#CCCCCC:) int i = 5;
println(i); (:cellnr:) int i = 5;
printString("i = ");
printInteger(i);
printNewline(); (:cell:) int i = 5;
println("i = " + i); (:tableend:)




Bookmark and Share