summaryrefslogtreecommitdiff
path: root/code/debug/communication/rx/rx_teensy/src/main.cpp
blob: 768b70b4493db24d990994aade23bbdb31f06992 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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));
  }
  milis(1);
  
}