Added BTSerial Code
This commit is contained in:
parent
247cafd30d
commit
375187200f
|
@ -0,0 +1,19 @@
|
|||
#include <SoftwareSerial.h>
|
||||
|
||||
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());
|
||||
}
|
Loading…
Reference in New Issue