summaryrefslogtreecommitdiff
path: root/code/debug/camera/communication/rx_teensy/src
diff options
context:
space:
mode:
authorAbel Tim <git@abeltim.com>2025-05-12 20:56:11 +0200
committerAbel Tim <git@abeltim.com>2025-05-12 20:56:11 +0200
commitc007afbd2c1339d58a582a905f07a5b39ddaafbd (patch)
tree367431b4c5095442cc7b714f4849ef35d206bff2 /code/debug/camera/communication/rx_teensy/src
parent1fb85fcf2582320cc41621b90adbb0a1aef551e0 (diff)
downloadrobotica-c007afbd2c1339d58a582a905f07a5b39ddaafbd.tar.gz
robotica-c007afbd2c1339d58a582a905f07a5b39ddaafbd.zip
cam comm + readme -4
Multi-line description of commit, feel free to be detailed. Signed-off-by: Abel Tim <git@abeltim.com>
Diffstat (limited to 'code/debug/camera/communication/rx_teensy/src')
-rw-r--r--code/debug/camera/communication/rx_teensy/src/main.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/code/debug/camera/communication/rx_teensy/src/main.cpp b/code/debug/camera/communication/rx_teensy/src/main.cpp
new file mode 100644
index 0000000..5491bab
--- /dev/null
+++ b/code/debug/camera/communication/rx_teensy/src/main.cpp
@@ -0,0 +1,19 @@
+// this code is for Teensy 4.1 to read serial data and relay it to serial 1(computer)
+
+#include <Arduino.h>
+
+int incomingbyte = 0;
+void setup() {
+ Serial.begin(9600);
+ Serial1.begin(9600);
+ Serial.print("Starting ....");
+}
+
+void loop() {
+ if (Serial1.available() > 0) {
+ incomingbyte = Serial1.read();
+ Serial.print(char(incomingbyte));
+ }
+ milis(1);
+
+}