Hi!
I am a beginner into HC-05 Bluetooth and Arduino field. I'm currently working on a Relay connect automatically when in range Arduino Bluetooth module project, using an Arduino Nano and the HC-05 Bluetooth module.
I would like something look like the Bluetooth speaker, whenever smartphone is nearby (in range) relay will "ON" automatically, smartphone is out off range relay will "OFF" automatically. is this possible to Mobil Bluetooth and hc-05 paired Bluetooth connection with or without android app.
How do I make the code and sketch it , any one have idea please send details or similar project link.
Please refer below image for more my project idea...
So no data is being sent? Only Bluetooth connection status is important?
I have never used an HC-05 myself, but this page shows that the status led on the module is connected to pin 6. Can you tell when the HC-05 is connected by the way the led blinks?
Blink once in 2 sec: Module has entered Command Mode
Repeated Blinking: Waiting for connection in Data Mode
Blink twice in 1 sec: Connection successful in Data Mode
If you can, perhaps you can connect pin 6 to an Arduino input and write some code to interpret the signal and control the relay.
There are two aspects to your project. First is using the state pin on the HC05 to determine the connected status. There is a good discussion here.
https://forum.arduino.cc/index.php?topic=597070.0
Your second issue is the auto connect to a phone. The HC05 will need to be in master mode.
Martyn Currey has a discussion here
HC-05 FC-114 and HC-06 FC-114. Part 3 – Master Mode and Auto Connect | Martyn Currey.
Google search on "HC05 auto connect to phone".
Thank you for your reply, I will check this methods... ![]()
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
