2

I bought a hm19 (link 2), 2 hc05s, an Arduino micro, and an Arduino due. I'm trying to turn an led on and off using my phone over Bluetooth. I verified that all modules work by themselves. So here's my issue.

First is that the Hc05 (link 1 below) modules simply do not respond to any AT command at all but work for serial communication. I have tried shorting a pin to send it into AT mode but that just made it impossible for me to communicate with it since I cannot get any input on my desktop using an USB cable from the Bluetooth module which brings me to the second issue.

Second is that I can send inputs from the serial monitor from my desktop to my phone but i cannot send data from my phone to my desktop. I have tracked this issue down to being in between the Bluetooth module and the Arduino. I have strong reasons to believe that DSD tech (hm19) have mislabled their bluetooth module because plugging rx into rx, tx to tx, gnd to gnd, and vcc to 5v works while flipping the rx and tx pins gives me a weird format.

Is there anyway I can fix the second issue preferably so i can diagnose the first one myself?

Link 1: https://www.amazon.com/gp/product/B07C1PXM44/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

Link 2: https://www.amazon.com/gp/product/B07MBLVHH8/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1

Connecting RX to TX and TX to RX enter image description here Connecting RX to RX and TX to TX enter image description here

All inputs were "1" and were sent from my desktop to my phone here's the code run using an Arduino DUE with the TX0 and RX0 pins

char inputByte;
void setup() {
 Serial.begin(9600);
 pinMode(13,OUTPUT);

}

void loop() {
while(Serial.available()>0){
  inputByte= Serial.read();
  Serial.println(inputByte);
  if (inputByte=='Z'){
  digitalWrite(13,HIGH);
  }
  else if (inputByte=='z'){
  digitalWrite(13,LOW);
  } 
  }
}
1
  • Have you read this HC-05 "how-to" or an equivalent? When I last used an HC-05, this is what I needed to get it going.
    – JRobert
    Commented Dec 13, 2021 at 13:34

0

Your Answer

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

Browse other questions tagged or ask your own question.