Bluetooth module not connecting to mobile phone

Hello!

I am trying to create a simple LED Blinking system using Arduino UNO R2, Hc-05 Bluetooth Module and an MIT App Inventor app that I created myself.

But, whenever I try to connect the Bluetooth module with my app (or even with my phone) it shows an error (Error 507: Unable to connect. Is the device on?). I tried connecting with a downloaded app from play store but i's not connecting with that also. So, I am assuming that there is some problem with the connections or with Arduino Code.

I have connected VCC of the module to +5V of Arduino, GND to GND, TX of module to D0 of Arduino and RX of module to the GND with a pair of 1k ohm resistors in series (which means they are giving 2k ohm resistance), and to D1 of Arduino via a 1k ohm resistor.

One more important point to tell is that the red LED on Bluetooth module is blinking rapidly, which I suppose means it's ready for connection. I am also attaching the code here. If required, should I send the image of the circuit I have connected.

int incomingByte;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(2, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (Serial.available() > 0) {
    incomingByte = Serial.read();
    if (incomingByte == 0) {
      digitalWrite(2, LOW);
    }
    else {
      digitalWrite(2, HIGH);
    }
  }
}

Please help
Regards

That doesn't make sense. Use your resistors to make voltage divider instead.

Read this tutorial:

I meant to say the same thing. I just explained that circuit itself. RX of module is connected to a node. The node has two connections: one with TX of Arduino through 1k ohm resistor, and the other with GND though 2k ohm resistor.

Please guide if I have understood the circuit incorrectly
Thanks for your reply @kmin!

Are all devices using the same flavour of Bluetooth?

I don't know about it. Please guide @sonofcy.

Please help @kmin/@sonofcy or anybody else on the forum.

Sure it is an HC-05 and not an HM-10?

Then do the research, I have 'guided' you.

This is why we prefer a wiring diagram not a word salad. Simply hand draw where your actual wires run NOT just copy the instructions. Post a photo of that. Make sure the unobvious parts are labelled and include links to datasheets.

You have received quite a bit of help so far but you are not taking that help. See post 4 and 7.

Please post a link to the product page for the HC-05 module and a hand-drawn wiring diagram showing YOUR wiring. It may be nonfunctional, a mislabeled product, or you have a wiring problem.

@jremington @jim-p

https://robu.in/product/hc-05-6pin-bluetooth-module-with-button/
I have purchased the module from this link.

I have made this circuit diagram on TinkerCad (I wanted to show the exact thing I have done). All the three resistors are of 1k ohm (because I currently don't have 2k ohm resistor).

Since, TinkerCad doesn't have Bluetooth Module, I am mentioning here which pin of the module is attached to which strip of the Breadboard.
Strip 21: RX
Strip 22: TX
Strip 23: GND
Strip 24: VCC

You need to pair it with your phone first, before you can use your app.

It doesn't make much sense, as several wires go nowhere.

Hand drawn diagrams are preferred.

Why don't you just follow the tutorial given on the web page where you purchased the module.

Possibly an attempt to re-invent the wheel, and ending up with a square one. It's also, apparently a secret, so why don't you put us all out of our misery, and confine yourself to using a standard Bluetooth terminal on the phone, thereby keeping the most likely villain out of the game?

Your wiring diagram and description in post #12 seems kosher, if hard to understand, and in line with your code in post #1.

The fast flash means "power on, ready to connect". You don't say if you have actually paired Bluetooth with the phone. You need no more than the flashing LED on Bluetooth to do this.