From e42691d0f4ee350a9e3474d6b1ebd6e4339487b7 Mon Sep 17 00:00:00 2001 From: Tom Igoe Date: Wed, 14 Sep 2011 18:26:04 -0400 Subject: [PATCH] Deleted Software Serial TwoPortRXExample because it was a duplicate of TwoPortReceive example --- .../TwoPortRXExample/TwoPortRXExample.ino | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100755 libraries/SoftwareSerial/examples/TwoPortRXExample/TwoPortRXExample.ino diff --git a/libraries/SoftwareSerial/examples/TwoPortRXExample/TwoPortRXExample.ino b/libraries/SoftwareSerial/examples/TwoPortRXExample/TwoPortRXExample.ino deleted file mode 100755 index 1db4536de..000000000 --- a/libraries/SoftwareSerial/examples/TwoPortRXExample/TwoPortRXExample.ino +++ /dev/null @@ -1,50 +0,0 @@ -#include - -SoftwareSerial ss(2, 3); -SoftwareSerial ss2(4, 5); - -/* This sample shows how to correctly process received data - on two different "soft" serial ports. Here we listen on - the first port (ss) until we receive a '?' character. Then - we begin listening on the other soft port. -*/ - -void setup() -{ - // Start the HW serial port - Serial.begin(57600); - - // Start each soft serial port - ss.begin(4800); - ss2.begin(4800); - - // By default, the most recently "begun" port is listening. - // We want to listen on ss, so let's explicitly select it. - ss.listen(); - - // Simply wait for a ? character to come down the pipe - Serial.println("Data from the first port: "); - char c = 0; - do - if (ss.available()) - { - c = (char)ss.read(); - Serial.print(c); - } - while (c != '?'); - - // Now listen on the second port - ss2.listen(); - - Serial.println("Data from the second port: "); -} - -void loop() -{ - if (ss2.available()) - { - char c = (char)ss2.read(); - Serial.print(c); - } -} -