My HC 05 module does not receive data

Hi, I'm using an HC 05 module to make an LED turn on and off. The issue is that the buttons on the apk do not work. I downloaded a Serial Bluetooth Terminal and the module can send data. Here is the code I am using:

void setup()
{
  Serial.begin(38400);
  pinMode(13, OUTPUT);
}

void loop()
{
  if (Serial.available() > 0)
  {
    char data = Serial.read();
    if (data == 'a')
    {
      digitalWrite(13, HIGH);
    }
    else if (data == 'b')
    {
      digitalWrite(13, LOW); 
    }
  }
}

This might be helpful

also this might help https://www.youtube.com/watch?v=w5LgLsCumFI

1 Like

Thank you! So I didn't really figure out what was wrong with what I had but I saw that some people set pins 3 and 4 to be their RX and TX and that worked for me.

1 Like

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