Thanks for all your suggestions, they were very useful
-
Power_Broker, the "bad data" phrase means I received the ASCII characters 100,101 and 102 (d,e,f) using the Bluetooth Serial Controller app
-
The voltage divider idea had no effect on the results
In conclusion, I'll try to install Serial Bluetooth by Kai Morich
Ps.- I'm attaching a look of my device
Thanks, It works with Serial Bluetooth
One questions when the '1' or '0' are sent, the HC shows also the following ASCII characters:
-
before '1': 49, and after '1' :10 and 13
-
before '0': 48, and after '0' :10 and 13
Are this values normal, or anything I'm not able to distinguish is happening?
carlitos101:
2) The voltage divider idea had no effect on the results
The divider is good practice, but I have never heard of an HC-05 dying without it. The picture shows a standard setup and the pin labelling is exactly what you would expect.
carlitos101:
- Power_Broker, the "bad data" phrase means I received the ASCII characters 100,101 and 102 (d,e,f) using the Bluetooth Serial Controller app
You are STILL are only answering half of the question. When you received characters 100,101 and 102 (d,e,f), what were the characters you were trying to send? Identifying the exact output for an exact input is extremely important when debugging any system.
carlitos101:
One questions when the '1' or '0' are sent, the HC shows also the following ASCII characters:
-
before '1': 49, and after '1' :10 and 13
-
before '0': 48, and after '0' :10 and 13
Are this values normal, or anything I'm not able to distinguish is happening?
Looks like you are also receiving '\r' and '\n' characters. If there is an option for "No line ending" or something like that in your bluetooth serial monitor, it will fix the problem. A better solution would be to handle the case where you receive a newline character, identify it, and then ignore it. See this post for clarification of handling newline characters.