Jdy40 Arduino Example Best !!exclusive!! -

This guide covers everything you need to know about the JDY-40. You will learn how it works, how to configure it with AT commands, and how to build a working transmitter and receiver system. Understanding the JDY-40 Module

Connect the other end of the 1kΩ resistor to the JDY-40 pin. Connect a 2kΩ resistor from the JDY-40 RXD pin to GND . Essential AT Commands for Configuration

To enter AT mode, pull the SET pin low (to GND) before powering the module. Send commands via Serial (9600 baud, newline ending).

Open two separate Serial Monitor instances in the Arduino IDE, each corresponding to its own Arduino board. Set both Serial Monitors to 9600 baud. Type in one monitor and it will appear on the other. 4. Configuring JDY-40 via AT Commands jdy40 arduino example best

#include // Connect JDY-40 TX to Arduino Pin 2, RX to Arduino Pin 3 SoftwareSerial jdy40(2, 3); void setup() // Start hardware serial for PC communication Serial.begin(9600); // Start software serial for JDY-40 jdy40.begin(9600); Serial.println("JDY-40 Connected. Type something..."); void loop() // If data comes from JDY-40, send it to PC if (jdy40.available()) Serial.write(jdy40.read()); // If data comes from PC, send it to JDY-40 if (Serial.available()) jdy40.write(Serial.read()); Use code with caution. Steps to Run Upload the code to both Arduino boards.

// Variables for Non-blocking LED Blink unsigned long lastReceiveTime = 0; const long linkTimeout = 1000; // If no data for 1s, consider link idle

Because the JDY-40 is a , you must use a level shifter or a simple voltage divider when connecting it to a 5V Arduino (like the Uno). JDY-40 Pin Arduino Pin (5V Uno) VCC DO NOT connect to 5V. GND Common ground. RXD 7 (SoftSerial TX) Use voltage divider for safety. TXD 6 (SoftSerial RX) Direct connection is fine. SET GND / 3.3V GND for AT mode; 3.3V/Floating for Transmit mode. CS Ground this to "Wake" the module. Arduino Example Code (Transmitter & Receiver) This guide covers everything you need to know

Open your Serial Monitor at with Both NL & CR enabled. Send these commands one by one: Test communication: AT (Should return +OK ) Set Module A (Master) Device ID: AT+DVID1111

: The JDY-40 Wireless Serial Module PDF on Scribd provides the essential hardware specifications, including its 120-meter transmission range and 2.4GHz operating frequency. Critical Usage Tips Voltage Limitation : Always remember that the

void setup() Serial.begin(9600); // Debug serial jdy.begin(9600); // JDY-40 UART Serial.println("JDY-40 Transmitter Ready"); Connect a 2kΩ resistor from the JDY-40 RXD pin to GND

Expected Response: +OK (Sets the communication channel to 05. Match this on both modules) Type AT+BAUD4 →right arrow

Serial.println("JDY-40 Master/Slave Ready");

SoftwareSerial jdySerial(JDY_RX_PIN, JDY_TX_PIN); // RX, TX