summaryrefslogtreecommitdiff
path: root/code/debug/IR/teensy-read/teensy-read.ino
diff options
context:
space:
mode:
Diffstat (limited to 'code/debug/IR/teensy-read/teensy-read.ino')
-rw-r--r--code/debug/IR/teensy-read/teensy-read.ino30
1 files changed, 30 insertions, 0 deletions
diff --git a/code/debug/IR/teensy-read/teensy-read.ino b/code/debug/IR/teensy-read/teensy-read.ino
new file mode 100644
index 0000000..6ce767b
--- /dev/null
+++ b/code/debug/IR/teensy-read/teensy-read.ino
@@ -0,0 +1,30 @@
+int incomingByte = 0; // for incoming serial data
+
+void setup() {
+ Serial.begin(9600);
+ Serial1.begin(75);
+ Serial2.begin(75);
+
+}
+
+// _________________________________________
+// / fucking mixes the signal and prints but \
+// | dont know recieve format yet so keeping |
+// \ it here /
+// -----------------------------------------
+// \ ^__^
+// \ (oo)\_______
+// (__)\ )\/\
+// ||----w |
+// || ||
+
+void loop() {
+ if (Serial1.available() > 0) {
+ incomingByte = Serial.read();
+ Serial.println(incomingByte, DEC);
+ }
+ if (Serial2.available() > 0) {
+ incomingByte = Serial.read();
+ Serial.println(incomingByte, DEC);
+ }
+} \ No newline at end of file