add bridge
This commit is contained in:
parent
a40177bd7a
commit
a084ae45d7
24
Bridge/bridge.ino
Normal file
24
Bridge/bridge.ino
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user