Skip to content

Instantly share code, notes, and snippets.

@taesamja
Created January 4, 2017 06:16
Show Gist options
  • Save taesamja/c2a81654f526e10fb6d8fffac23f745d to your computer and use it in GitHub Desktop.
Save taesamja/c2a81654f526e10fb6d8fffac23f745d to your computer and use it in GitHub Desktop.
#include <SoftwareSerial.h>
int rx=2;
int tx=3;
SoftwareSerial BTSerial(rx, tx);
void setup() {
Serial.begin(9600);
BTSerial.begin(9600);
}
void loop() {
if(BTSerial.available())
Serial.write(BTSerial.read());
if(Serial.available())
BTSerial.write(Serial.read());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment