aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSudar <sudar@sudarmuthu.com>2013-06-22 15:35:01 +0530
committerSudar <sudar@sudarmuthu.com>2013-06-22 15:35:01 +0530
commit2b75a0ddb48b8aef12d2c67089f7189cb00ceab3 (patch)
tree67c4c11b6dc018c20a06557f1042127019020616 /examples
parente0856e51d972c1b7484f769e665ba7a680c53724 (diff)
Add Tiny SoftwareSerial example
This example shows how to use softwareSerial in a ATtiny device using the ATtiny core
Diffstat (limited to 'examples')
-rw-r--r--examples/TinySoftWareSerial/Makefile12
-rw-r--r--examples/TinySoftWareSerial/TinySoftwareSerial.ino12
2 files changed, 24 insertions, 0 deletions
diff --git a/examples/TinySoftWareSerial/Makefile b/examples/TinySoftWareSerial/Makefile
new file mode 100644
index 0000000..b68f08d
--- /dev/null
+++ b/examples/TinySoftWareSerial/Makefile
@@ -0,0 +1,12 @@
+# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
+
+BOARD_TAG = attiny85-8
+ARDUINO_VAR_PATH = /home/sudar/Dropbox/code/arduino-sketches/hardware/attiny/variants
+BOARDS_TXT = /home/sudar/Dropbox/code/arduino-sketches/hardware/attiny/boards.txt
+ISP_PORT = /dev/ttyACM*
+
+ARDUINO_LIBS = SoftwareSerial
+
+include $(ARDMK_DIR)/arduino-mk/Arduino.mk
+
+# !!! Important. You have to use make ispload to upload when using ISP programmer
diff --git a/examples/TinySoftWareSerial/TinySoftwareSerial.ino b/examples/TinySoftWareSerial/TinySoftwareSerial.ino
new file mode 100644
index 0000000..a53e059
--- /dev/null
+++ b/examples/TinySoftWareSerial/TinySoftwareSerial.ino
@@ -0,0 +1,12 @@
+#include <SoftwareSerial.h>
+
+SoftwareSerial mySerial(3, 4); // RX, TX
+
+void setup() {
+ mySerial.begin(9600);
+}
+
+void loop() {
+ mySerial.println(millis());
+ delay(1000);
+}