Hello! I am going to make a project of a smart garden whose data is sent to an app and I am going to use a bluetooht HC-05 module for it, I was testing this module separately and after configuring it with its AT commands I connect it to my cell phone but in a few seconds it disconnects, I tried from the PC and the same thing happens , I even restarted the factory module to see if that was the problem and neither. This is the code I am using:
include <SoftwareSerial.h>
SoftwareSerial miBT(10, 11);
void setup(){
Serial.begin(9600);
Serial.println("Listo");
miBT.begin(38400);
}
void loop(){
if (miBT.available())
Serial.write(miBT.read());
if (Serial.available())
miBT.write(Serial.read());
}
If you don’t get an an answer in Spanish, then make a note there that you close this question to bring it to the English forum and mention you had posted elsewhere (with the link) and did not get an answer. This way helpers wont duplicate work.