~repack~ - Jdy40 Arduino Example Best

If you want maximum reliability, use a voltage divider on the Arduino TX → JDY-40 RX line:

void loop() // Read from wireless module if (jdy40.available()) String command = jdy40.readString(); command.trim();

The JDY-40 is a low-power, 2.4GHz wireless transceiver that functions as a "wireless serial port" for microcontrollers like Arduino jdy40 arduino example best

The JDY-40 turns a complex wireless link into a simple serial connection. Use 3.3V, match baud rates, and you’ll have two Arduinos talking in under 5 minutes.

—The JDY-40 is a low-power, half-duplex 2.4 GHz transceiver module offering simple UART-based communication for Arduino projects. Unlike complex protocols like nRF24L01, JDY-40 uses transparent serial transmission with automatic pairing and frequency hopping. This paper presents hardware connections, example code for point-to-point communication, range testing results, and use-case analysis. The module is ideal for short-range (≤100m) wireless sensor networks, remote controls, and data logging. If you want maximum reliability, use a voltage

: Type AT+DVID5555 -> Ensure both modules share the same device ID for pairing.

#include const int jdyRx = 2; const int jdyTx = 3; SoftwareSerial jdySerial(jdyRx, jdyTx); String incomingData = ""; boolean recvInProgress = false; void setup() Serial.begin(9600); jdySerial.begin(9600); Serial.println("Receiver Ready."); void loop() while (jdySerial.available() > 0) char rc = jdySerial.read(); if (rc == '<') recvInProgress = true; incomingData = ""; // Clear buffer else if (rc == '>') recvInProgress = false; processData(incomingData); else if (recvInProgress) incomingData += rc; // Append character void processData(String data) int parsedValue = data.toInt(); Serial.print("Received Value: "); Serial.println(parsedValue); // Example action: Turn on onboard LED if value is high if (parsedValue > 500) digitalWrite(LED_BUILTIN, HIGH); else digitalWrite(LED_BUILTIN, LOW); Use code with caution. Best Practices for Stable Performance : Type AT+DVID5555 -> Ensure both modules share

: Sets the Wireless ID (0000 to FFFF). Both modules must have the same RFID to talk.

To prevent interference with the hardware serial port (used for uploading code to the Arduino), we use SoftwareSerial to configure and test the module. JDY-40 Pin Arduino Uno Pin Do not use 5V Common ground Pin 2 (Rx) Directly connected Pin 3 (Tx) Use a 1kΩ / 2kΩ resistor voltage divider Used to toggle AT mode Module always enabled Part 1: Configuring the JDY-40 with AT Commands

: For stable communication between multiple links, it is best to separate their channels by at least 6 to avoid interference.

: If you are looking to build a multi-node network (e.g., one hub and multiple remote nodes), Ben Emmett's JDY-40 Wireless Broadcast project provides complete Arduino and Python code examples using JSON formatting for message transmission.

Scroll to Top