From 375187200ffba5deea99115d142be2d7bf71579e Mon Sep 17 00:00:00 2001 From: BM Devs Date: Fri, 7 Apr 2017 03:03:18 -0400 Subject: [PATCH] Added BTSerial Code --- BTSerial/BTSerial.ino | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 BTSerial/BTSerial.ino diff --git a/BTSerial/BTSerial.ino b/BTSerial/BTSerial.ino new file mode 100644 index 0000000..4003a61 --- /dev/null +++ b/BTSerial/BTSerial.ino @@ -0,0 +1,19 @@ +#include + +SoftwareSerial BTSerial(10, 11); // RX | TX + +void setup() +{ + Serial.begin(38400); + Serial.println("Enter AT commands:"); + BTSerial.begin(38400); +} + +void loop() +{ + if (BTSerial.available()) + Serial.write(BTSerial.read()); + + if (Serial.available()) + BTSerial.write(Serial.read()); +}