Hey guys!
I am currently working on a project with Arduino nano and HC-05 bluetooth module. I have to change some settings in the AT Mode. It already worked with Software Serial, but i have to get in to AT Mode via Pin 1 and 0 of the nano. The module is with a customer and we want to provide an update, the pins are allready soldered so its not possible to use other pins.
Is ist possible to enter AT Mode and change some default settings via Pin 0 and 1 of the Nano? For information: i use a voltage divider, so i havev 3,3V for RX pin and between the 5V of the Arduino and VCC of HC-05 is a switch, so i can turn off the power of HC-05 for updates.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup()
{
myserial.begin(9600); //Initialize virtual serial port
Serial.begin(9600); //Initialize Arduino default serial port
}
void loop()
{
while(1){
while (myserial.available()) {
Serial.write(myserial.read());//if Serial received data, output it via mySerial.
}
while(Serial.available()) {
myserial.write(Serial.read());//if myserial received data, output it via Serial.
}
}
}
Something like this? Then you can write the AT-Commands in the serial monitor.
Yes i did.
Unfortunately both does not work. I get both time no answer. I tried changing the name so i could see, if the name would change, even if i get no answer. But name did not change.
String readString;
void setup() {
Serial.begin(9600);
Serial.println("serial test 0021"); // so I can keep track of what is loaded
}
void loop() {
while (Serial.available()) {
delay(2); //delay to allow byte to arrive in input buffer
char c = Serial.read();
readString += c;
}
if (readString.length() >0) {
Serial.println(readString);
readString="";
}
}
THANKS! It worked awesome! I can now change the name of my bluetooth module via port 0 and 1 and provide the update without changing something on the soldering!