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 ----------
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.