0
$\begingroup$

This is my first project using Bluetooth module HC-05. I am using two of these modules. One is connected to an Arduino Nano(slave) and another one is connected to an Arduino Uno(master). I have paired them through AT commands.

For testing, I was giving a pulse in pin 7 on the Nano. If there is a pulse, then slave will send character "1". If not, then it will send "0".

In the Uno there is an LED connected to pin 13. If the master receives '1', then the LED will on and if receives '0', the LED will remain off.

here is my source code ----------

slave code=> slave code

master code=> master code

The Arduino IDE isn't showing any bug, but the code is not working at all. Although I am giving a pulse in pin 7 of the Nano, the LED is remaining off in the Uno. I am at a loss now. I have a lot to do after this and my project submission is knocking at the door. Please help me as soon as possible.

$\endgroup$
  • $\begingroup$ Screenshots of text? Why didn't you also print and scan them? $\endgroup$ – FooTheBar May 10 '17 at 16:29
  • $\begingroup$ sorry.I was in a hurry then. $\endgroup$ – Rakibul Islam Prince May 10 '17 at 16:44
  • 2
    $\begingroup$ but creating and posting a screenshot takes much longer than copy/paste... $\endgroup$ – FooTheBar May 10 '17 at 17:17
  • 1
    $\begingroup$ @RakibulIslamPrince - How did you fix it? What was the problem? You can answer your own question (and accept the answer!), and then you can help future visitors who have the same problem. $\endgroup$ – Chuck May 11 '17 at 10:43
  • 1
    $\begingroup$ @RakibulIslamPrince please post an answer to this question with how you fixed this. Thanks. $\endgroup$ – sa_leinad May 11 '17 at 22:47
2
$\begingroup$

I had connected some pins the wrong way.

I had connected the "EN" pin with 5V even after pairing. I was out of my brain. As soon as it came to my sight I disconnected the "EN" pin from 5V. After a few seconds it started to work....

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.