From 2bcc96fb10a4a84a7e5537d1d3258a7f919b6917 Mon Sep 17 00:00:00 2001 From: Abel Tim Date: Thu, 20 Mar 2025 08:27:18 +0100 Subject: code --- CODE/debug/IR/communication/rx_teensy/rx_teensy.ino | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 CODE/debug/IR/communication/rx_teensy/rx_teensy.ino (limited to 'CODE/debug/IR/communication/rx_teensy') 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)); + } +} -- cgit v1.2.3