Arduino uno and bluetooth HC-06

Hi,

Several days ago I purchased a bluetooth module HC-06 for arduino board. I have link it together with my arduino uno and copy/paste sample code but the problem is that I don't get any response via Serial Monitor. Here is code, any idea what is wrong?

#include <SoftwareSerial.h>

SoftwareSerial bluetooth(4, 2);
 
void setup()
{
  Serial.begin(9600);  // Begin the serial monitor at 9600bps
  bluetooth.begin(9600);  // Start bluetooth serial at 9600
}
 
void loop()
{
  if(bluetooth.available())  // If the bluetooth sent any characters
  {
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read());  
  }
  if(Serial.available())  // If stuff was typed in the serial monitor
  {
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
  }
  // and loop forever and ever!
}

I have link it together with my arduino uno

With duct tape? How IS important.

Hi,

VCC goes from module to 5v
GND goes from module to GND
TXD goes from module to PIN 2
RXD goes from module to PIN 4

Anyone?

What is sending data to the Bluetooth device?

Tx on the module goes to Rx on the Arduino and vice versa. You may have them the wrong way round.

Are you sure your HC06 is a 5v device? Mine is 3.3v and I expect 5v would damage it.

...R

Indeed I'm sure they are the wrong way round but don't panic - no harm will be done. Similarly, a 3.3v HC-06 is a very rare device indeed. It pays to check, but probably no harm done there either.

I don't know if HC-06 will pair with IOS, but it will not work with it.

Fixed, finally. It was a problem with test wire. After I changed the broken wire the module has started working.

Thank you guys.