aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/README.md4
-rw-r--r--examples/SerialPrint/Makefile5
-rw-r--r--examples/SerialPrint/SerialPrint.ino10
3 files changed, 16 insertions, 3 deletions
diff --git a/examples/README.md b/examples/README.md
index 39425b3..631704d 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -3,9 +3,7 @@ the different usage patterns
- BlinkInAVRC - Shows how to use plain AVR C code
- ATtinyBlink - Shows how to use different cores like ATtiny
-
-These three examples are a step back, in the "tests" directory.
-
- Blink - Shows normal usage
- HelloWorld - Shows how to include Arduino libraries
+- SerialPrint - Shows how serial monitor can be used
- BlinkChipKIT - Shows how to use ChipKIT
diff --git a/examples/SerialPrint/Makefile b/examples/SerialPrint/Makefile
new file mode 100644
index 0000000..f9d5cf4
--- /dev/null
+++ b/examples/SerialPrint/Makefile
@@ -0,0 +1,5 @@
+# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
+
+BOARD_TAG = uno
+
+include ../../Arduino.mk
diff --git a/examples/SerialPrint/SerialPrint.ino b/examples/SerialPrint/SerialPrint.ino
new file mode 100644
index 0000000..e129c9d
--- /dev/null
+++ b/examples/SerialPrint/SerialPrint.ino
@@ -0,0 +1,10 @@
+void setup() {
+ Serial.begin(9600);
+ Serial.print("Press any key: ");
+}
+
+void loop() {
+ if (Serial.available()) {
+ Serial.println(Serial.read());
+ }
+}