Last active
December 23, 2020 18:14
-
-
Save kevinmcaleer/62cccd00120256374d3719b7ab7b92ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
// This is a short sketch to test bluetooth modules. | |
// Connect the bluetooth RX to Pin 2 on the Arduino and TX to Pin 3. | |
SoftwareSerial mySerial(2,3); | |
void setup() { | |
// put your setup code here, to run once: | |
mySerial.begin(9600); | |
Serial.begin(9600); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
if (mySerial.available()) | |
Serial.write(mySerial.read()); | |
if (Serial.available()) | |
mySerial.write(Serial.read()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bluetooth Test Sketch
This is a short sketch to test bluetooth modules.
Connect the bluetooth RX to Pin 2 on the Arduino and TX to Pin 3.