I connected an HC-05 module to pins 0 and 1 of an Arduino, including a voltage divider between Arduino TX and HC-05 RX.
Communication to the mobile app I made, goes only via:
Serial.begin(9600);
Serial.println(integer);
Changing the name and pincode of the module, however, isn't working.
Using soldering, I attached a wire from pin 34 to a voltage divider (1K and 2K, to get 3,3V).
The other leg of the 1K resistor is connected to Arduino pin 8. The other leg of the 2K resistor is connected to GND. Actually, I didn't have a 2K resistor so I put two 1K resistors in serie.
I am using this code to change the name and pincode on start-up, and to communicate with my app.
void setup() {
pinMode(8, OUTPUT);
Serial.begin(9600);
digitalWrite(8, HIGH);
Serial.write("AT+PSWD=9876\r\n");
Serial.write("AT+NAME=NEWNAME\r\n");
digitalWrite(8, LOW);
}
void loop () {
if (statement) {
Serial.println(integer);
}
}
The basic communication still works perfectly fine, with the app showing the right values.
However, both in Android settings and in my app, I still see the name as 'HC-05' and the pincode is still the default '1234'.
I'm hoping something is amiss in my code.
If not, that probably means I didn't solder the wire to pin 34 correctly, not having the right tools for such precision soldering, and possibly have a cold joint. Then I might look for a clipper.