Projects STRLCPY CatSniffer Commits bf145b01
🤬
  • ■ ■ ■ ■ ■ ■
    firmware/PICO/SerialPasstrough/SerialPasstrough.ino
     1 +unsigned long baud = 115200;
     2 + 
     3 +void setup() {
     4 + //Begin Serial ports
     5 + Serial.begin(baud);
     6 + Serial1.begin(baud);
     7 + for(int i=11;i<16;i++){
     8 + pinMode(i,INPUT);
     9 + }
     10 + pinMode(2,INPUT);
     11 + pinMode(3,INPUT);
     12 +
     13 +}
     14 + 
     15 +void loop() {
     16 + //SerialPassthrough
     17 + if (Serial.available()) { // If anything comes in Serial (USB),
     18 + Serial1.write(Serial.read()); // read it and send it out Serial1 (pins 0 & 1)
     19 + }
     20 + 
     21 + if (Serial1.available()) { // If anything comes in Serial1 (pins 0 & 1)
     22 + Serial.write(Serial1.read()); // read it and send it out Serial (USB)
     23 + }
     24 +}
     25 + 
Please wait...
Page is in error, reload to recover