HM-10 not sending from Arduino Uno to BT app

Hi! I'm trying to get an HM-10 to send and receive information between an app and an Arduino Uno. I'm using the Bluetooth Serial Monitor app on an Android phone, and here is my code:

#include <SoftwareSerial.h>

SoftwareSerial HM10(2,3);

void setup() {
  
  Serial.begin(9600);
  HM10.begin(9600);

}

void loop() {
  
  if (HM10.available()) {
   Serial.write(HM10.read());
    }

  if (Serial.available()) {
    HM10.write(Serial.read());
  }
}

I have the HM-10 TXD connected to pin 2 on the Arduino Uno and the RXD connected to pin 3. I am able to send strings from the app to the arduino, but not the other way around.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.