From 3a37663fed334d4bbe9123b3d7f5631b89d73135 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sun, 29 Dec 2013 18:49:27 -0500 Subject: [PATCH] Adding a dumb serial echo thingy --- arduino/SerialEcho/Makefile | 1 + arduino/SerialEcho/SerialEcho.ino | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 120000 arduino/SerialEcho/Makefile create mode 100644 arduino/SerialEcho/SerialEcho.ino diff --git a/arduino/SerialEcho/Makefile b/arduino/SerialEcho/Makefile new file mode 120000 index 0000000..51c7f30 --- /dev/null +++ b/arduino/SerialEcho/Makefile @@ -0,0 +1 @@ +../arduino.mk \ No newline at end of file diff --git a/arduino/SerialEcho/SerialEcho.ino b/arduino/SerialEcho/SerialEcho.ino new file mode 100644 index 0000000..5565d20 --- /dev/null +++ b/arduino/SerialEcho/SerialEcho.ino @@ -0,0 +1,13 @@ +const unsigned int BAUD_RATE = 9600; + +void setup() { + Serial.begin(BAUD_RATE); +} + +void loop() { + if (Serial.available() <= 0) { + return; + } + + Serial.write(Serial.read()); +}