Hi All!
I having a problem interfacing between my Arduino Uno and JDY-31. Something weird is going on. When I connecting JDY-31 to pins 10 and 11 and using Software Serial bound to those pins I able to send and receive data great, but when I reconnecting it to RX/TX pins and trying to do the same with Hardware Serial it seems that nothing happens when I sending the data from my Android phone.
Just to recap and prevent common question - I connecting Arduino TX to JDY-31 RX through voltage divider (1.1k and 2.2k resistor. Tested with my multimeter - getting ideal 3.3 volts here.
I also did loopback test of my Arduino RX/TX pins (RESET to GND and jumper between RX/TX) - test PASSED (receiving what I sending in Serial monitor).
Did the same with JDY-31 (RX to TX jumper) - TEST PASSED (receiving what I sending in Bluetooth terminal on Android)
Sketch I uploading when I connecting JDY-31 to Hardware Serial (RX/TX) - Doesn't works:
void setup() {
Serial.begin(19200);
pinMode(13, OUTPUT);
}
void loop() {
if (Serial.available() > 0) {
String command = Serial.readString();
Serial.print("Received: ");
Serial.println(command);
if (command == "on") {
digitalWrite(13, HIGH);
}
if (command == "off") {
digitalWrite(13, LOW);
}
}
}
Sketch I uploading when connecting it with Software Serial (10 and 11 pins) - Works Great:
#include <SoftwareSerial.h>
SoftwareSerial EEBlue(10, 11); // RX | TX
void setup() {
EEBlue.begin(19200);
pinMode(13, OUTPUT);
}
void loop() {
if (EEBlue.available() > 0) {
String command = EEBlue.readString();
EEBlue.print("Received: ");
EEBlue.println(command);
if (command == "on") {
digitalWrite(13, HIGH);
}
if (command == "off") {
digitalWrite(13, LOW);
}
}
}
Of course I disconnecting RX/TX pins when I uploading sketch for Hardware Serial case and powering Arduino from 9v battery through jack instead of USB when testing.
I am very confused. Any help deeply appreciated.
Thank you ![]()

