25 lines
457 B
Arduino
25 lines
457 B
Arduino
|
// simple bridge between Raspberry Pi Pico's
|
||
|
// serial 1 and serial 2
|
||
|
|
||
|
|
||
|
#define S2_TX 8 // GP8, actual pin 11
|
||
|
#define S2_RX 9 // GP9, actual pin 12
|
||
|
|
||
|
UART Serial2(S2_TX,S2_RX,0,0);
|
||
|
|
||
|
void setup() {
|
||
|
Serial.begin(9600);
|
||
|
Serial2.begin(9600);
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
while (Serial2.available() > 0) {
|
||
|
Serial.print(Serial2.readString());
|
||
|
delay(10);
|
||
|
}
|
||
|
while (Serial.available() > 0) {
|
||
|
Serial2.print(Serial.readString());
|
||
|
delay(10);
|
||
|
}
|
||
|
}
|