Skip to content

Commit 1470f6c

Browse files
committed
Merge pull request processing#4015 from gohai/serial-fixes
Serial fixes
2 parents 33aa35a + 7567bb8 commit 1470f6c

2 files changed

Lines changed: 180 additions & 28 deletions

File tree

java/libraries/serial/examples/SimpleWrite/SimpleWrite.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ boolean mouseOverRect() { // Test if mouse is over square
5353
}
5454
5555
void loop() {
56-
if (Serial.available()) { // If data is available to read,
56+
while (Serial.available()) { // If data is available to read,
5757
val = Serial.read(); // read it and store it in val
5858
}
5959
if (val == 'H') { // If H was received

0 commit comments

Comments
 (0)