Aduino Bluetooth code problem! Answered
I am building a Morse Code machine with bluetooth functuonality.
It is in the early stages at the moment but I have hit a problem.
My code uses a button to input Morse code which is displayed on an LCD and flashes an LED on pin 5, but also incorporates a bluetooth HC05 which controls an LED on pin 13.
Seperately, they work fine but I wanted to merge the two sketches. I have succeeded but for one small problem.
When pressing the LED 'ON' button on my android app, the LED only comes on after the Morse code button has been pressed. And it works the same way for the LED 'OFF' function on the app. Press it, then press the Morse code button and the LED switches off again. This repeats. I cannot figure out why this button is controlling the Bluetooth LED command signal.
I have changed baud rates of the bluetooth but to no joy.
I have attached my code.
Can anyone help me solve this problem?!?