To configure the module, pull the . All commands must end with \r\n (CR+LF).
2.2V to 3.6V ( 3.3V recommended ; do not use 5V directly). Communication: Standard TTL Serial (UART). Range: Up to 120 meters in open sight.
// Function to change the JDY-40's ID to the desired remote ID. void setRemoteID(int id) digitalWrite(2, LOW); // Enter AT mode delay(100); Serial.print("AT+RFID"); if (id < 10) Serial.print("00"); else if (id < 100) Serial.print("0"); Serial.println(id); // e.g., "AT+RFID001" delay(100); digitalWrite(2, HIGH); // Exit AT mode delay(50);
The JDY‑40 uses 3.3 V logic levels. When connecting it to a 5 V Arduino (such as Uno or Mega), you must use a voltage divider (e.g., 1kΩ and 2kΩ) on the Arduino TX → JDY‑40 RX line to avoid damaging the module. For 3.3 V boards (Arduino Pro Mini 3.3V, ESP32, etc.) a direct connection is safe. jdy40 arduino example best
: Sets the communication speed. AT+BAUD4 sets it to 9600 baud (default).
: If your transmission drops or the module resets, the 3.3V rail on your Arduino may be experiencing voltage sag. Power the JDY-40 via a dedicated 3.3V regulator circuit capably providing at least 100mA.
The JDY-40 is a low-power 3.3V device. Connecting its power pins directly to the Arduino's 5V rail will permanently damage the module. Pinout Configuration Connect to Arduino 3.3V GND: Connect to Arduino GND RXD: Connect to Arduino TX pin (Use a voltage divider) TXD: Connect to Arduino RX pin To configure the module, pull the
: Type AT+RFID1234 -> Ensure both modules share the same 4-digit ID.
/* * Title: JDY-40 Smart Bridge & Link Monitor * Description: The "Best" example to configure JDY-40 and monitor connection health. * * Circuit: * - JDY-40 TX -> Arduino Pin 2 * - JDY-40 RX -> Arduino Pin 3 * - Built-in LED (Pin 13) used for Link Status. */
I need to structure the article. Let's start writing. Communication: Standard TTL Serial (UART)
digitalWrite(3, HIGH); // HIGH = Transparent Transmission Mode Serial.println("JDY-40 Configured!");
You must configure the JDY-40 for best range and low interference. Connect the module directly to your PC via a USB-Serial adapter (3.3V). Send AT commands ending with \r\n .