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