summaryrefslogtreecommitdiff
path: root/CODE/debug/IR/communication/rx_teensy/rx_teensy.ino
blob: 7dca76d113030e24cafcd07275b5c186f52fd13f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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));
  }
}