summaryrefslogtreecommitdiff
path: root/CODE/debug/IR/communication
diff options
context:
space:
mode:
authorAbel Tim <abel@abel-ms7c95.home>2025-03-20 08:27:18 +0100
committerAbel Tim <abel@abel-ms7c95.home>2025-03-20 08:27:18 +0100
commit2bcc96fb10a4a84a7e5537d1d3258a7f919b6917 (patch)
tree47408aa5a3ba5cc040447cabf3771ff688972d3d /CODE/debug/IR/communication
parent9c8f7e2f1101b4bb8e0c5459e14af253f150c8b7 (diff)
downloadrobotica-2bcc96fb10a4a84a7e5537d1d3258a7f919b6917.tar.gz
robotica-2bcc96fb10a4a84a7e5537d1d3258a7f919b6917.zip
code
Diffstat (limited to 'CODE/debug/IR/communication')
-rw-r--r--CODE/debug/IR/communication/rx_teensy/rx_teensy.ino17
-rw-r--r--CODE/debug/IR/communication/tx_seeed/tx_seeed.ino20
2 files changed, 37 insertions, 0 deletions
diff --git a/CODE/debug/IR/communication/rx_teensy/rx_teensy.ino b/CODE/debug/IR/communication/rx_teensy/rx_teensy.ino
new file mode 100644
index 0000000..7dca76d
--- /dev/null
+++ b/CODE/debug/IR/communication/rx_teensy/rx_teensy.ino
@@ -0,0 +1,17 @@
+int incomingByte = 0; // for incoming serial data
+
+void setup() {
+ Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
+ Serial1.begin(9600);
+}
+
+void loop() {
+ // send data only when you receive data:
+ if (Serial1.available() > 0) {
+ // read the incoming byte:
+ incomingByte = Serial1.read();
+
+ // say what you got:
+ Serial.print(char(incomingByte));
+ }
+}
diff --git a/CODE/debug/IR/communication/tx_seeed/tx_seeed.ino b/CODE/debug/IR/communication/tx_seeed/tx_seeed.ino
new file mode 100644
index 0000000..fe6d1da
--- /dev/null
+++ b/CODE/debug/IR/communication/tx_seeed/tx_seeed.ino
@@ -0,0 +1,20 @@
+long randNumber;
+
+void setup() {
+ Serial.begin(9600);
+ Serial1.begin(9600);
+ delay(2500);
+ randomSeed(analogRead(0));
+
+}
+
+void loop() {
+ randNumber = random(300);
+ Serial.println("transmission test");
+ Serial1.println("transmission test");
+ Serial.println(randNumber);
+ Serial1.println(randNumber);
+ delay(1000);
+
+
+}