0

In order to transmit text from the Arduino board to the HC-05 Bluetooth module, I have use Serial.print. However, I don't see a way to debug the code without using Serial.print to test the other features of the software. Is there another way to transmit text from the Arduino to the computer, and from the Arduino to the HC-05, simultaneously (and without WiFi)?

  • Yes. Plenty. You could add WiFi to it. You could use an external UART adaptor and SoftwareSerial. You could add Ethernet to it. There's many ways. – Majenko Dec 17 '18 at 12:48
  • WiFi isn't available in this case. I'll edit the question. – Pradana Aumars Dec 17 '18 at 12:49
  • The simplest is probably to just use SoftwareSerial and an external USB to UART adaptor. Or just move the HC-05 to other pins and use SoftwareSerial with it (as long as you're no faster than around 9600 baud). – Majenko Dec 17 '18 at 12:52
1

Yes, what version of Arduino are you using?

  • For Arduino Mega, you can use Serial.println for writing debug data and Serial1.println for communication with HC-05. (See Example: MultiSerial Example)
  • For other Arduino boards, you can use Serial.println for writing debug data and SoftwareSerial library for communication with HC-05. (See Example: SofwareSerial)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.