diff options
author | Cristian Maglie <c.maglie@bug.st> | 2012-01-04 15:14:51 +0100 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2012-01-04 15:14:51 +0100 |
commit | 8c2b5b979a75d109ae7cc306afc50d7ffe1e0366 (patch) | |
tree | 19ac8d91c7209397e7dc890b432a254ae9a7cd62 /libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino | |
parent | be52c95820400d48e47615232d3c38236166fad3 (diff) |
Moved libraries folder inside platform folder. Now libraries and examples are searched per board/platform
Diffstat (limited to 'libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino')
-rw-r--r-- | libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino b/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino new file mode 100644 index 0000000..1f535bd --- /dev/null +++ b/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino @@ -0,0 +1,21 @@ +#include <SoftwareSerial.h> + +SoftwareSerial mySerial(2, 3); + +void setup() +{ + Serial.begin(57600); + Serial.println("Goodnight moon!"); + + // set the data rate for the SoftwareSerial port + mySerial.begin(4800); + mySerial.println("Hello, world?"); +} + +void loop() // run over and over +{ + if (mySerial.available()) + Serial.write(mySerial.read()); + if (Serial.available()) + mySerial.write(Serial.read()); +} |