Bluetooth HC-05 - Not receiving data on my computer or phone

Hello,
my setup is as follows: Arduino Uno R3 + Bluetooth module HC-05.
Have them connected using this guide:
http://archive.fabacademy.org/fabacademy2017/fablabbcn/students/91/week15.html
My test program code is as follows (I don't really care about specific test code, I just want to be sure I can receive data on my PC before I move on with my project)

int temp; //variable to hold temperature sensor value
long tm,t,d; //variables to record time in seconds

void setup()
{
  Serial.begin(9600);
  pinMode(0,INPUT);//temperature sensor connected to analog 0
  analogReference(DEFAULT);
}

void loop()
{
  temp = analogRead(0); //analog reading temperature sensor values

  //required for converting time to seconds
  tm = millis();
  t = tm/1000;
  d = tm%1000;

  Serial.flush();

  //printing time in seconds
  Serial.print("time : ");
  Serial.print(t);
  Serial.print(".");
  Serial.print(d);
  Serial.print("s\t");

  //printing temperature sensor values
  Serial.print("temperature : ");
  Serial.print(temp);
  Serial.println("f");
  
  delay(2000);//delay of 2 seconds
}

So the steps I'm doing are as follows:

  1. Connect my Uno to PC (having all HC-05 wires disconnected), compile and upload code. Verify serial output.
  2. Disconnect Uno, connect all HC-05 wires, connect Arduino with a USB cable to a wall phone charger
  3. Pair HC-05 and open serial connection (e.g. Putty in Windows, cutecom in Ubuntu, HC-05 app in Android) to see if data is received. No data is received in any of those (I have chosen the correct serial port of course).

Can you please help me with this? Thanks

pan19ss:
I just want to be sure I can receive data on my PC before I move on with my project)

In that case, get rid of the irrelevant stuff. The problem may be in your setup, which reads as nonsense.

void setup()
{
  Serial.begin(9600);
    pinMode(0, INPUT_PULLUP);// only needed for  JY-MCU v1.06?
}

void loop()
{
  Serial.println("hello ");
   delay(2000);
}

If that doesn't work, check your wiring (again). You might also try receiving with an Android phone, which is somewhat simpler.

Nick_Pyner:
In that case, get rid of the irrelevant stuff. The problem may be in your setup, which reads as nonsense.

void setup()

{
  Serial.begin(9600);
    pinMode(0, INPUT_PULLUP);// only needed for  JY-MCU v1.06?
}

void loop()
{
  Serial.println("hello ");
  delay(2000);
}


If that doesn't work, check your wiring (again). You might also try receiving with an Android phone, which is somewhat simpler.

Ok used this code instead but still nothing. Wiring looks good, even checked all connections using a multimeter.

As I said I tried the Android app as well. While the hc-05 paired with my phone (but not connected), the red LED on the hc-05 blinks fast (about 4-5 times per second) and on the Arduino there are only 2 red LEDs on, "L" and "ON" (the green ones TX-RX are off).
When I connect through the app by tapping on the device name-address, on the app says "connected to HC-05" and the hc-05 LED is blinking slowly (2 consecutive blinks every 3 seconds). The LEDs on the arduino stay the same. However no output on the phone.

No data is received in any of those

I can not confirm this. When I use the referenced Android App (or another bluetooth terminal app) I see the serial output from your code.

The tutorial looks correct. I would check your wiring very carefully.

You were both right. I had connected RX-TX cables wrong - thought RX from hc-05 goes to RX on arduino and similar for TX, but they should be the other way, didn't notice :slight_smile: