I'm trying to connect my Arduino Uno (it's a clone by LAFVIN) to my Windows laptop via Bluetooth. The Bluetooth module I'm using is an HC-06. When I open bluetooth settings on my laptop I can see the HC-06 and pair with it. It shows up as, 'paired' not, 'connected' in my list of bluetooth devices and the light on the board never stops flashing. When I click on HC-06 in my list of bluetooth devices there's no, 'connect' button, just the 'remove device' button.
HC-06 is assigned to COM 8 but the Arduino IDE is unable to detect it.
I can connect my Arduino to my Android phone and communicate with it via Serial terminal so I know my hardware works.
My Bluetooth module is connected to pins 1, and 0.
Rx to 1
Tx to 0
Any idea what I'm doing wrong? I'm new to Arduino and I apologize if the problem is obvious.
With my Bluetooth modules I pair with the device like a table or phone, but connect with an application like Bluetooth Serial Terminal.
Pins 0 and 1 are the hardware serial pins on most Arduino boards. Better to use a different serial port for a Bluetooth module and save the hardware (USB) Serial port for program upload, debug and monitoring program flow and variable values. Use a software serial port on the single hardware port boards* (Uno Nano) or a spare hardware port on those with more than one hardware port (Mega).
*and you won't have to disconnect the Bluetooth module to upload code.
When I try to connect to the board via Bluetooth using the Arduino IDE I can't get it to connect.
Hc-06 is on COM 8
I went into tools and set the port to COM 8
Nothing was detected and when I tried sending something through the serial monitor it froze.
Am I missing something?
It id hard to help you cause I have no idea what you are doing.
What is the application running on the laptop? What data is the app sending?
How is the Bluetooth module connected to the Uno? Schematic please, word descriptions are too error prone.
What is the Bluetooth module baud rate?
What software is running on the Uno. Read the how get the most out of this forum sticky to see how to properly post code. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code in code tags.
You can see your project, we cannot. All that we know is what you tell us. Ideally we would have enough information to completely duplicate your project.
orangepelting:
When I try to connect to the board via Bluetooth using the Arduino IDE I can't get it to connect.
Hc-06 is on COM 8
I went into tools and set the port to COM 8
Nothing was detected and when I tried sending something through the serial monitor it froze.
Am I missing something?
I think you are, and it's a PC problem. What you are saying implies you have TWO HC-06s, one for Arduino and one on PC serial port COM8. You should be using laptop's built-in Bluetooth - surely?
You have already proven Arduino and Bluetooth with the phone, no need to change anything there.
Despite what you imply, you have PROBABLY used some Bluetooth sniffer on the laptop in the proper manner - i.e. pairing is fine. I believe all that remains is that you need to ensure that the laptop terminal programme is talking to the correct serial port, i.e. that which has laptop's Bluetooth. As mentioned above, it is the PROGRAMME that makes the connection.
(I failed to mention, I am using Arduino IDE's Serial Monitor to communicate with the HC06 board.) The mistake I made was trying to send data through an incoming serial port. I should have been using COM 10 (outgoing to HC-06) rather than COM 8 (incoming from HC-06).
Thanks for all the help!
Also to clarify:
Nick_Pyner:
I think you are, and it's a PC problem. What you are saying implies you have TWO HC-06s, one for Arduino and one on PC serial port COM8. You should be using laptop's built-in Bluetooth - surely?
I am using my laptop's built-in Bluetooth, sorry if I was unclear.