Previously we have made a control pad in Processing to turn the built-in LED on the Arduino ON/OFF below:
https://www.hackster.io/yu-fan/arduino-led-control-pad-with-processing-5239c9
The connection is fairly straight forward:
HC-05 ---> Arduino
TX --> Pin 10
RX --> Pin 11
VCC --> 5V
GND --> GND
Plugin the Arduino USB, this will also power up your HC-05.
1. Pair the HC-05 with your computer, once it is paired, you will see two serial COM port in the Windows Bluetooth configuration:
One for incoming, one for outgoing(usually marked as "dev"), take note of the "Outgoing COM"
2. For the Arduino, we are going to use SoftwareSerial to read from the HC-05
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(10, 11); // RX | TX
Pin 10 for RX and 11 for TX, so connect the TX on HC-05 to Pin 10 and RX to Pin 11.
3. Modify the COM port in Processing code
//Confirm the BT COM port and change below line
myPort=new Serial(this, "COM17",115200);
The rest of the code is basically the same as the previous project, short demonstration video here.
Note: To change the baud rate on BC-05, follow your retailer's advice, use either USB FTDI device or an Arduino. I personally changed it with a USB FTDI from DSDtech, they also have a program available to change pretty much all other settings. Available here: http://www.dsdtech-global.com/search/label/HC-05
Comments
Please log in or sign up to comment.