I am trying to determine how to detect that an HC-05 has gone into AT Command Mode from within my code. If I connect State to a pin and read that pin, I am only determining that the module is paired with another module. Correct? If I read the Enable pin, will that tell me whether the module is in AT Command Mode or not? Haven’t been able to find clear documentation on this.
Dunno ... can you send an AT command and look at the response and determine if has been interpreted from the receiver being in AT mode?
That would be a possibility but it feels rather kludgy. But thanks.
Probably not to both, but I believe there is some stuff on the Martyn Currey website. Reading the state pin is something best done by the human eye, and reading the EN just confirms what you put there.. I don't understand why you need to do any of this and, and, if you must have confirmation, why don't you just read the "OK" confirmation like everybody else does?
I don't know how everybody else does it, but checking for the OK does seem simple and predictable. I will make that change to my code and see how it goes. Thanks.
rhj4:
I don't know how everybody else does it, but checking for the OK does seem simple and predictable. I will make that change to my code and see how it goes. Thanks.
Let's put it this way: There is no way to "accidentally" put an HC-05 into AT mode unless you have soldered a wire to the HC-05's pin 34 and connected it to one of the Arduino's digital pins.
Do you know how to put the HC-05 into AT mode?