Skip to content

Instantly share code, notes, and snippets.

@y-fedorov
Created February 4, 2020 20:30
Show Gist options
  • Save y-fedorov/5117bcf2ffc180c0fa4b208ec22fe08b to your computer and use it in GitHub Desktop.
Save y-fedorov/5117bcf2ffc180c0fa4b208ec22fe08b to your computer and use it in GitHub Desktop.
UART Arduino
#include <SoftwareSerial.h>
// Arduino Nano 0 - RX 1 - TX
SoftwareSerial mySerial(0, 1);
void setup() {
Serial.begin(115200);
while (!Serial);
Serial.println("Ready! Go...");
mySerial.begin(115200);
}
void loop() {
if (mySerial.available()){
Serial.write(mySerial.read());
}
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment