From 8c2b5b979a75d109ae7cc306afc50d7ffe1e0366 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 4 Jan 2012 15:14:51 +0100 Subject: Moved libraries folder inside platform folder. Now libraries and examples are searched per board/platform --- .../SoftwareSerialExample/SoftwareSerialExample.ino | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino (limited to 'libraries/SoftwareSerial/examples/SoftwareSerialExample') 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 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()); +} -- cgit v1.2.3-18-g5258