I have a hm-10 module attached to Arduino Leonardo board, I'm using a bluetooth terminal app to send some text.
The problem is I can send data from the Serial monitor to my phone but when I send from my phone, there is no output in the serial monitor.
It works fine if I test it on Arduino Uno. I'm struggling with something that should be simple.
Can someone please help me?
Here is my code:-
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(4, 5);
void setup(){
Serial.begin(115200);
Serial.println("Hello!");
BTSerial.begin(115200);
}
void loop(){
while (BTSerial.available()){
byte data = BTSerial.read();
Serial.write(data);
}
while (Serial.available()){
byte data = Serial.read();
BTSerial.write(data);
}
}