Skip to content

Instantly share code, notes, and snippets.

@kevinmcaleer
Last active December 23, 2020 18:14
Show Gist options
  • Save kevinmcaleer/62cccd00120256374d3719b7ab7b92ca to your computer and use it in GitHub Desktop.
Save kevinmcaleer/62cccd00120256374d3719b7ab7b92ca to your computer and use it in GitHub Desktop.
#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());
}
@kevinmcaleer
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment