From a084ae45d75fc6b150445b7940e5cc37db5fbd74 Mon Sep 17 00:00:00 2001 From: gutmet Date: Sun, 12 Mar 2023 17:12:50 +0100 Subject: [PATCH] add bridge --- Bridge/bridge.ino | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Bridge/bridge.ino diff --git a/Bridge/bridge.ino b/Bridge/bridge.ino new file mode 100644 index 0000000..cff025d --- /dev/null +++ b/Bridge/bridge.ino @@ -0,0 +1,24 @@ +// 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); + } +}