Arduino with HC-06 BlueTooth Module
This is nothing new, and the code is not mine, just putting this all in one place for my own reference. This tutorial seems to be the best so far:
http://www.instructables.com/id/Remotely-Control-LED-using-HC-05-Bluetooth-Arduino/
Parts:
Arduino Uno
8 jumpers
BT-06 Bluetooth to serial module (find them on Ebay or Amazon)
1x 10kΩ Resistor
1x 18kΩ Resistor
1x 470Ω Resistor
1x LED
USB printer cable to program and power the Arduino
http://www.instructables.com/id/Remotely-Control-LED-using-HC-05-Bluetooth-Arduino/
Parts:
Arduino Uno
8 jumpers
BT-06 Bluetooth to serial module (find them on Ebay or Amazon)
1x 10kΩ Resistor
1x 18kΩ Resistor
1x 470Ω Resistor
1x LED
USB printer cable to program and power the Arduino
In the image below, the perfboard is standing in for the BT-06 module since it was not in the Fritzing library. Things to note are that the BT-06 takes 3.3V so it is connected to the 3.3V line from the arduino for VCC, and since the arduino puts out 5V on it's I/O's, I needed to drop the RX line for the BT-06 to something closer to 3.3V using a voltage divider (those are the yellow wires) the 10KΩ resistor is first from the Arduino TX pin, then, after the resistor, the line is peeled off to go to the RX on the HC-06 module (this will then be around 3.2-3.3V which is OK for the HC-06). The following resistor which connects to ground is an 18kΩ and is a necessary part of the divider. I highlighted the voltage divider in purple below, the next image is just the same image without the highlighting.
When programming, the TX and RX pins need to be disconnected either from the Arduino or the HC-06, that is because the Arduino uses those pins while programming. Once programmed, power down and reconnect the TX and RX pins, then power back up and it should work.
The example program I used was found here - see step 2 (thanks to yhtomitsy at Instructables for the working example). Once that is uploaded, I used Bluetooth Terminal for Andriod to send the "n" (to turn on) and "f" to turn off.
Below are some pics showing how to set up Bluetooth Terminal for Android to connect to the HC-06 and then activate or turn off the LED.
The example program I used was found here - see step 2 (thanks to yhtomitsy at Instructables for the working example). Once that is uploaded, I used Bluetooth Terminal for Andriod to send the "n" (to turn on) and "f" to turn off.
Below are some pics showing how to set up Bluetooth Terminal for Android to connect to the HC-06 and then activate or turn off the LED.
References / Thanks:
http://www.instructables.com/id/Add-bluetooth-to-your-Arduino-project-ArduinoHC-06/
https://play.google.com/store/apps/details?id=Qwerty.BluetoothTerminal&hl=en
http://www.circuitsgallery.com/2014/10/arduino-project-android-robot-control.html
https://www.youtube.com/watch?v=x3KAXjnP06o
http://www.instructables.com/id/Add-bluetooth-to-your-Arduino-project-ArduinoHC-06/
https://play.google.com/store/apps/details?id=Qwerty.BluetoothTerminal&hl=en
http://www.circuitsgallery.com/2014/10/arduino-project-android-robot-control.html
https://www.youtube.com/watch?v=x3KAXjnP06o