I am working with an Arduino Nano and HC05 Bluetooth module.
I want to put HC05 to sleep mode, so I need to enter in configuration mode to use AT commands.
I want to do that by sofware (using EN pin).
I connect EN pin to either 3.3V or 5V arduino outputs and I power the Arduino, and HC05 starts in configuration mode without problem. But if I use a digital pin (configurated as output and writing it as HIGH) connected to EN, it doesn’t work (just starts in user mode).
I don’t understand why.
My code is this:
SoftwareSerial miBT(10, 11);
const int pin = 6;
Serial.begin(9600); // comunicacion de monitor serial a 9600 bps
pinMode(pin , OUTPUT);
miBT.begin(38400); // comunicacion serie entre Arduino y el modulo a 9600 bps
I can’t understand why using a digital output doesn’t work as 3.3 V output.
I only played once with Bluetooth so take this for what it is ( aka please research yourself ).
From memory, I'm reasonably sure that the enable pin is only read by the HC05 during a power up of the module. Please take into account the boot time of the Nano before it starts executing your code.
To use AT mode, you need to control the power supply to HC-05 as well as the EN pin, i.e. to get out of comms mode, reconfigure, then restart in comms mode.
I'm not sure what you are about, but I think you are kidding yourself anyway. IF you want to send data at regular intervals, you could still do that simply by turning the normally-off power on for a short period at those times - no configuration required.
Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.
Continued cross posting could result in a time out from the forum.
Could you also take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.