Can't connect to bluetooth module JDY-23

i got it connected when the arduino still plugged in the laptop but i'm unable to connect to it wirelessly, neither my phone nor my laptop can do it.
here is the code i use from chatgpt:

#include <SoftwareSerial.h>

SoftwareSerial BTSerial(10, 11); // RX, TX

void setup() {
  Serial.begin(9600); // Serial Monitor baud rate
  BTSerial.begin(9600); // Bluetooth module baud rate
  Serial.println("Enter AT commands:");
}

void loop() {
  if (BTSerial.available()) {
    char c = BTSerial.read();
    Serial.write(c); // Echo to Serial Monitor
  }
  if (Serial.available()) {
    char c = Serial.read();
    BTSerial.write(c); // Send to Bluetooth module
  }
}

this is the dataset i use:
https://grobotronics.com/images/companies/1/JDY-23_Notes_xara.pdf?1652699264610

COM CHANGED


Better information on your Rx, Tx connections might help, and using one of those 9v PP3 batteries at a time like this is a really bad idea.

JDY-23 Module:
VCC to Arduino 3,3V
GND to Arduino GND
TXD to Arduino Pin 11
RXD to Arduino Pin 10
And what should i use as power source for arduino?

It appears that you have connected Rx to Rx and Tx to Tx. Transmitters transmit to receivers. Receivers don't hear anything from other receivers. The back of the Bluetooth module clearly says 3.6 to 6v, so why are you feeding it 3.3v? This quite apart from the question of adequate power from the 3.3v pin.

Anything that can deliver the appropriate power. A PP3 is essentially devoid of power. Having said that, it may work for little while, once you have fixed the other stuff. Try a 9v 2A wall wart.

i change the vcc to the 5v pin and txd to pin 11, rxd to pin 10 but when i type AT, it didnt response. But if i switch the rxd and txd, it work.


But still wont connect to bluetooth no matter what i do
About the power source, i want to put this on a moving robot so i can't really use a 9v 2a wall wart, any other solution?

The wall wart will ensure you don't have a power problem now, and it will plug straight into the barrel jack. You can come up with a 6xAA or 18650 pack later.
I also submit you should solve the communication problem first and address AT mode later.
Your wiring should be Rx to Tx and Tx to Rx. I never use software serial but I believe your code is the wrong way round.

Further your code looks like standard stuff for a BT2 device. You need to ensure that it is kosher for your BT4 Bluetooth module.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.