1

I’m trying to send and receive data from my laptop to arduino nano via hc05 Bluetooth for a rocket flight computer. For some reasons which I don’t know, I can send data from processing software using myPort.write() but cannot send a String back from arduino back to processing for telemetry purpose. At some point it was working, then stopped. I tried another code from HowToMechatronics.com and still it didn’t work. I’m using the Serial.println function on Hardware serial. Pls help

In the processing code, I use all necessary libraries and functions e.g serialEvent(), myPort.bufferUntil(\n), myPort.readStringUntil(‘\n’)enter image description here

[1]: https://i.stack.imgur.com/V3Jqn.jpg![enter image description here](https://i.stack.imgur.com/usvad.jpg)enter image description hereenter image description here

9
  • Start by using something other than processing to try and receive your data. That way you can confirm which is the culprit: the Arduino setup or the Processing code.
    – Majenko
    Jul 12, 2021 at 13:23
  • I’ve done that. I first used the arduino ide, set the Port to COM8(Bluetooth ) and it didn’t work. I then used putty, also the same.
    – Brandy
    Jul 12, 2021 at 13:31
  • Ok, so next replace your firmware with a very simple one that just prints the value of millis() every second.
    – Majenko
    Jul 12, 2021 at 13:32
  • 1
    Let us continue this discussion in chat.
    – Brandy
    Jul 12, 2021 at 14:04
  • 1
    Remove the HC05 from the Arduino. Connect the HC05 TX pin to the HC05 RX pin and power it from the Arduino. Try sending data from the PC and see if it gets echoed back.
    – Majenko
    Jul 12, 2021 at 14:05

1 Answer 1

1

Update: After trying numerous codes, I was 💯 sure that it wasn’t a software problem. I then removed the Hc05 module from the circuit, and I was able to put it in AT mode(this means my module is working fine). This leaves only one possible problem I.e the circuit. I used a multimeter to measure the voltage between Hc05 RX and GND. I got 1.8v(but how?). After retracing the connections, I figured out the problem was with the voltage divide I used to step down 5v to 3.3v. I used a 2k Ohm resistor in place of a 1k, and a 1k in place of the 2k resistor. So that’s why I’m getting a voltage of around 1.8v. Turns out 1.8v is too low for Hc05 rx pin to use. After correcting it, everything works fine😃

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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