1

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)?

3
  • 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. – user39884 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
0

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)
2
  • I'm using an Arduino Uno. – user39884 Dec 17 '18 at 14:00
  • Ok, connect RXD pin and TXD pin of HC-05 to pin 10 and 11 of Arduino Uno and follow SoftwareSerial example. arduino.cc/en/Tutorial/SoftwareSerialExample – leoc7 Dec 17 '18 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy