I'm new to arduino and I'm trying to transmit data over Bluetooth between 2 hc-05s (on arduino nanos). I have linked them successfully and they seem to be able to communicate, except the serial terminal only shows the special character symbol �. I have made sure the baud rate is the same ("AT+UART?" returns "+UART:9600,0,0" on both device). My code is very basic as I am just testing:
The default Normal Mode (NOT AT Command Mode) data communication Bd for Bluetooth is 9600. Therefore, you should include the following line in your sketch:
Thanks for the reply - that worked. I'm also a bit confused about hc-05 in general, as different sources on the internet seem to contradict:
can the hc 05 be powered directly with the arduino 5v pin (connect 5v to VCC)? Some websites say hc-05 is 3.3v but I mean on the back it is printed "Power:3.6V - 6V"
can I trigger the AT mode programmatically? e.g. can I code a sketch so that it automatically changes the device it is connected to?
what do the different blinking modes of the LED suggest? I figured that in AT mode the LED turns on and off slowly.
I've tried looking for some datasheets but they only provide a list of AT commands. If it helps my firmware version is 2.0-20100601 and I think I only have a red LED.
Many thanks.
P.S. With triggering the AT mode thing, I guess a transistor solution is possible but is there a better way?
HC-05 is indeed 3.3v . The "Power:3.6V - 6V" is not written on the back of HC-05, it is on the back of the breakout board (commonly labelled zs-040 these days) This board includes a 3.3v regulator. Don't ask why they don't provide a regulator at the Rx pin.
Yes, you can trigger AT mode. Your project also needs to be able to control HC-05 5v power supply. You also need to supply 3.3v to the EN pins, which absolves you from having to push the button.
Fast flash means "power on, ready to connect" nothing else, no guarantees.
Slow flash means AT mode, i.e. merely successfully engaged the procedure, no other guarantees.
Anything else means "communicating via Bluetooth" depending on the breakout board. Sometimes it's a blink, sometimes a double blink, sometimes just solid. I don't know if this is user-programmable. It does not mean your signal wiring or code are kosher,