summaryrefslogtreecommitdiff
path: root/code/debug/communication/rx/rx_teensy/src
diff options
context:
space:
mode:
authorAbel Tim <abel.tim.t@gmail.com>2025-03-23 16:33:05 +0100
committerAbel Tim <abel.tim.t@gmail.com>2025-03-23 16:33:05 +0100
commit6b328bb4ca0184dc39f0184d1ad2f47b46e5d6d7 (patch)
treedae91189524571de504d01f655e7a953d6551b54 /code/debug/communication/rx/rx_teensy/src
parent59abac3480502b90c4cff17625ba29329dc461bf (diff)
downloadrobotica-6b328bb4ca0184dc39f0184d1ad2f47b46e5d6d7.tar.gz
robotica-6b328bb4ca0184dc39f0184d1ad2f47b46e5d6d7.zip
serial
Diffstat (limited to 'code/debug/communication/rx/rx_teensy/src')
-rw-r--r--code/debug/communication/rx/rx_teensy/src/main.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/code/debug/communication/rx/rx_teensy/src/main.cpp b/code/debug/communication/rx/rx_teensy/src/main.cpp
new file mode 100644
index 0000000..f8e33a1
--- /dev/null
+++ b/code/debug/communication/rx/rx_teensy/src/main.cpp
@@ -0,0 +1,19 @@
+// this code is for Teensy 4.1 to read serial data
+
+#include <Arduino.h>
+
+int incomingbyte = 0;
+void setup() {
+ Serial.begin(9600);
+ Serial2.begin(9600); //19200
+ Serial3.begin(9600); //19200
+ Serial.print("Starting ....");
+}
+
+void loop() {
+ if (Serial3.available() > 0) {
+ incomingbyte = Serial3.read();
+ Serial.print(char(incomingbyte));
+ }
+
+} \ No newline at end of file