aboutsummaryrefslogtreecommitdiff
path: root/libraries/SoftwareSerial/examples/SoftwareSerialExample
diff options
context:
space:
mode:
authorFederico Fissore <f.fissore@arduino.cc>2015-07-06 15:18:33 +0200
committerFederico Fissore <f.fissore@arduino.cc>2015-07-06 15:19:05 +0200
commitb5a130afb51c971fd7ceca8834b6055f1eada253 (patch)
treed1e964f67822e9b3f10382573a9579c85b9c3e3f /libraries/SoftwareSerial/examples/SoftwareSerialExample
parentc13cf02651e178ea7941a82bee364d82c6b19b9c (diff)
Examples: mass code format. See example_formatter.conf
Diffstat (limited to 'libraries/SoftwareSerial/examples/SoftwareSerialExample')
-rw-r--r--libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino12
1 files changed, 6 insertions, 6 deletions
diff --git a/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino b/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino
index f659133..d35303d 100644
--- a/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino
+++ b/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino
@@ -29,8 +29,7 @@
SoftwareSerial mySerial(10, 11); // RX, TX
-void setup()
-{
+void setup() {
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
@@ -45,11 +44,12 @@ void setup()
mySerial.println("Hello, world?");
}
-void loop() // run over and over
-{
- if (mySerial.available())
+void loop() { // run over and over
+ if (mySerial.available()) {
Serial.write(mySerial.read());
- if (Serial.available())
+ }
+ if (Serial.available()) {
mySerial.write(Serial.read());
+ }
}