After some false starts with a couple of HC-06 BlueTooth modules (slave only), we received a HC-05, which can be set for master or slave. Future articles will show two such equipped Arduino’s passing data back and forth. Out of the box, it’s set for 9600 baud, and a pairing code of 1234. I connected TX on the BT module to Pin 10 on the Arduino, and RX to Pin 11. I connected 5.0 on the BT module to Arduino 5v, and Gnd to Gnd. Some BT modules require a voltage divider to bring the 5v down to 3.3v. This module does not need it, it’s 5v friendly.
One of the first things I noticed, was that no LED’s light up, but since the device showed up when discovering BT devices, I pushed forward.
First, make sure you pair successfully. HC-05 showed up in my discovered bluetooth device list. My Terraterm found two com ports, 11 and 12, but uses 11 to receive data from the Arduino.
I uploaded the following sketch to the Arduino which is transmitting data from the Arduino wirelessly to my laptop (and to my android smartphone as well):
SoftwareSerial mySerial(10, 11); // RX, TX
// set the data rate for the SoftwareSerial port
void loop() // run over and over
Re-programming the HC-05 – http://www.instructables.com/id/Modify-The-HC-05-Bluetooth-Module-Defaults-Using-A/
Uploading sketches over Bluetooth – http://letsmakerobots.com/node/30915