Jdy40 Arduino Example Best Extra Quality (720p 2026)
: It functions as a "wireless wire." Data sent into one module's RX pin appears on the other module's TX pin. Range : Up to 120 meters in open areas.
This is the most common point of failure. The JDY-40 is a . Most Arduinos (Uno, Mega, Nano) use 5V logic. Connecting a 5V signal to the JDY-40’s RX pin can permanently damage it.
void loop() if (jdy.available()) String cmd = jdy.readStringUntil('\n'); cmd.trim();
: Verify that AT+DVID and AT+RFID are identical across both units. Make sure the SET pin is disconnected from GND during communication mode. jdy40 arduino example best
Instead of using a PC serial terminal, you can write a simple Arduino sketch to configure your modules. This is especially useful if you need to set the channel and ID on the fly or if you are deploying many modules.
: Receive Pin (Connects to Arduino TX via a voltage divider)
(Serial.available()) jdySerial.write(Serial.read()); : It functions as a "wireless wire
Even a simple module like the JDY‑40 can sometimes misbehave. Here are the most common issues and their solutions:
Common AT commands:
#include SoftwareSerial jdySerial(2, 3); // RX, TX unsigned long lastSendTime = 0; const unsigned long interval = 1000; // Send every 1 second void setup() Serial.begin(9600); jdySerial.begin(9600); Serial.println("Transmitter Initialised."); void loop() if (millis() - lastSendTime >= interval) lastSendTime = millis(); // Simulate sensor readings int temperature = random(20, 35); int humidity = random(40, 80); // Construct packet with start '<' and end '>' markers jdySerial.print("<"); jdySerial.print(temperature); jdySerial.print(","); jdySerial.print(humidity); jdySerial.println(">"); // Debug output to local PC Serial.print("Sent: T="); Serial.print(temperature); Serial.print("C, H="); Serial.print(humidity); Serial.println("%"); Use code with caution. Receiver Code (Base Station Node) The JDY-40 is a
Same as above, but you'll open the Serial Monitor.
The JDY-40 is a powerful little module that prioritizes simplicity above all else. It's the right choice for you if:
#include <DHT.h>