Skip to content

Commit 219c6e8

Browse files
committed
Updated Arduino example code to be Arduino 1.0+ compatible
1 parent d05dfbf commit 219c6e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/libraries/serial/examples/SimpleRead/SimpleRead.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ void setup() {
5454
5555
void loop() {
5656
if (digitalRead(switchPin) == HIGH) { // If switch is ON,
57-
Serial.print(1, BYTE); // send 1 to Processing
57+
Serial.write(1); // send 1 to Processing
5858
} else { // If the switch is not ON,
59-
Serial.print(0, BYTE); // send 0 to Processing
59+
Serial.write(0); // send 0 to Processing
6060
}
6161
delay(100); // Wait 100 milliseconds
6262
}

0 commit comments

Comments
 (0)