Let's Make Robots!

Need help with Arduino UNO R3 + HC-06 Bluetooth

Hello all! After I posted my Atom tanky robot that I was working on, I am now trying to connect it with bluetooth. I also bought some Ultrasonic sensors (HC-SR04). 

The bluetooth I use is: HC-06 Bluetooth V2.0 RF Wireless Transceiver Module Interface RS232 TTL

Ok, So I am trying to connect the bluetooth with my Android HTC phone OR PC with bluetooth, but both are failing. Could someone help me out? I tried some tutorials on the internet, but I get 0 succes out of them. So basicly I want to see if the bluetooth is working or not, so I am trying to test it out.

What is the fastest way to test if the bluetooth can send and is working? 

 

Thanks, F4LLCON

 

 

 

**EDIT**

Ok, After thinking and thinking what I could do, I thought it could maybe be because of my operating system. I run Windows 7. So I installed Windows XP on my Oracle VirtualBox and installed the expansion pack for VirtualBox to be able to use 2.0 USB.

After Windows XP was installed, I installed Tera Term 4.76 on it. Then I put my USB 2.1 Bluetooth Dongle I bought from china for cheap in my laptop. It installed and after the installation of the dongle on Windows XP, it had even one more function that was disabled on Windows 7. Other functions that did not work correctly worked perfect on Windows XP, like show paired devices, on Windows 7 it was empty and on Windows XP it shows the Bluetooth module. 

Next I noticed that on every page tutorial it says that you have to connect RX on the module to TX on the Arduino, and TX on the Arduino to RX on the module. Well this was a problem because it did not work. So I just changed it to RX - RX and TX - TX, and what happens? It works :D 

I used this code I found on the web and uploaded on my Arduino without the B-Module connected, and after uploading the code I connected the module, connected a 9v batter to my Arduino, and went into VirtualBox and started Tera Term, connected to COM3, outgoing and I could use 1 and 0 to turn of and on my led. 

 

Led negative to GND

Led Positive to pin 13

Acc from B-Module to 5v on breadboard

GND from B-Module to GND on breadboard

TX from B-Module to TX on Arduino

RX from B-Module RX on Arduino

5v from Arduino to breadboard

GND from Arduino to breadboard

 

Code on the Arduino:

 

char INBYTE;

int  LED = 13; // LED on pin 13

 

void setup() {

  Serial.begin(9600); 

  pinMode(LED, OUTPUT);

}

 

void loop() {

  Serial.println("Press 1 to turn Arduino pin 13 LED ON or 0 to turn it OFF:");

  while (!Serial.available());   // stay here so long as COM port is empty   

  INBYTE = Serial.read();        // read next available byte

  if( INBYTE == '0' ) digitalWrite(LED, LOW);  // if it's a 0 (zero) tun LED off

  if( INBYTE == '1' ) digitalWrite(LED, HIGH); // if it's a 1 (one) turn LED on

  delay(50);

}

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

So what's your over-all recommendation for this unit?  Thumbs up or down?  What kind of range are you getting on it?  Thanks!

.

Have you been able to pair the device?

Whenever I use something like SL4A or ArduinoCommander on Android, It gets paired. On my Windows 7 I could pair it for the first time, but after that it fails. I think it's related to my bluetooth adpater. My phone can pair with it though. For example, I followed this tutorial http://english.cxem.net/arduino/arduino5.php and http://www.instructables.com/id/Cheap-2-Way-Bluetooth-Connection-Between-Arduino-a/?ALLSTEPS and some others, Arduino and Windows based, all failed to send or show any data.