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(){

void loop(){
  while (BTSerial.available()){ 
    byte data = BTSerial.read();

  while (Serial.available()){
    byte data = Serial.read();
  • 1
    Leonardo has Serial1. You don't need to use SoftwareSerial
    – Juraj
    Commented Sep 24, 2021 at 4:33

1 Answer 1


I GOT IT!! It was problem with the pin settings.

According to SoftwareSerial library documentation, only pins 8,9,10,11,14,15,16 can be used for RX pin. But i used pin 4 for RX.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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