1
0
mirror of https://github.com/esp8266/Arduino.git synced 2026-01-06 05:22:30 +03:00

Modifying examples to use Serial.write() instead of Serial.print(BYTE).

This commit is contained in:
David A. Mellis
2011-02-26 13:57:41 -05:00
parent e031022a68
commit 6739f20bbf
7 changed files with 15 additions and 15 deletions

View File

@@ -52,15 +52,15 @@ void loop()
// read switch, map it to 0 or 255L
thirdSensor = map(digitalRead(2), 0, 1, 0, 255);
// send sensor values:
Serial.print(firstSensor, BYTE);
Serial.print(secondSensor, BYTE);
Serial.print(thirdSensor, BYTE);
Serial.write(firstSensor);
Serial.write(secondSensor);
Serial.write(thirdSensor);
}
}
void establishContact() {
while (Serial.available() <= 0) {
Serial.print('A', BYTE); // send a capital A
Serial.print('A'); // send a capital A
delay(300);
}
}