Using the STATE pin of the HC-05 BT module

Hi everyone,

I've set up a HC-05 module and connected the STATE pin to pin 13 on the arduino giga. When I connect my app with it, and only then, I send data to the app. If there is no connection I'm not sending data to Serial1.

Now I've noticed something peculiar: if I remove the HC-05 module, or disconnect the wire to pin 13, it will read pin 13 as HIGH. So if there is no BT module, or it's faulty, I'll be streaming non stop data. And don't want that.

Would the solution be to put a 10K pull down resistor on pin 13?

A 10K pulldown seems viable.

What pinMode did you set pin 13 on your Giga??

sounds like it's INPUT_PULLUP..

~q


#define btState 13

pinMode(btState, INPUT);

A floating input will have an undefined state. It may read HIGH, LOW or alternate between those two.

2 Likes

it's just floating because it's not hooked up..
a wire connected to it but not connected on the other side is an antenna..
once it's connected, no more floating..

good luck.. ~q

1 Like

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