From 2624a2239a1ea6f8842adaddec3f3dacb5ec0849 Mon Sep 17 00:00:00 2001 From: "yorick.geoffre" Date: Sun, 21 May 2023 21:50:15 +0200 Subject: [PATCH] initial commit --- piconaut-AT-bridge.ino | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 piconaut-AT-bridge.ino diff --git a/piconaut-AT-bridge.ino b/piconaut-AT-bridge.ino new file mode 100644 index 0000000..e312213 --- /dev/null +++ b/piconaut-AT-bridge.ino @@ -0,0 +1,27 @@ +#include + +#define MAX_LINE_LENGTH 256 +char lineBuffer[MAX_LINE_LENGTH]; +uint8_t bufferPosition = 0; + +void setup() { + // put your setup code here, to run once: + Serial1.setTX(12); + Serial1.setRX(13); + Serial1.begin(115200); + Serial.begin(115200); + delay(2000); +} + +void loop() { + // if data is available on Serial1, read it and write it to Serial + if (Serial1.available()) { + int incomingByte = Serial1.read(); + Serial.write(incomingByte); + } + + if (Serial.available()) { + int incomingByte = Serial.readLine(); + Serial1.write(incomingByte); + } +} \ No newline at end of file