aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
+}