Jdy40 Arduino Example Best ((exclusive)) Official
Let’s build the simplest possible wireless link. Two Arduinos, each with a JDY‑40, will exchange data: whatever one Arduino sends via the Serial Monitor appears on the other’s Serial Monitor.
#include <SoftwareSerial.h>
: Sets the Device ID. Useful for identifying specific nodes in a network.
Use code with caution. Copied to clipboard Pro Tips for Success : By default, JDY-40 modules ship with the same jdy40 arduino example best
: Type AT+DVID5555 -> Ensure both modules share the same device ID for pairing.
The JDY-40 has several pins. For this best example (transparent serial), we only need a few: JDY-40 Pin Arduino Connection 3.3V3.3 cap V 3.3V3.3 cap V GND RXD UART Receive Pin 3 (Software Serial TX) TXD UART Transmit Pin 2 (Software Serial RX) SET Mode Setting Floating (Running Mode) / GND (AT Command) CS Chip Select Floating (Active) / GND (Sleep)
2.2V to 3.6V ( Note: 5V logic on Arduino requires a level shifter or 3.3V power) Baud Rate: Up to 19,200 bps Communication Interface: Standard TTL Serial (UART) Best Arduino Connection Example Let’s build the simplest possible wireless link
To ensure your code compiles smoothly, tell me: Which are you using? Do you want to add checksum verification to the packets to completely eliminate transmission errors? Share public link
This implementation uses SoftwareSerial to preserve the hardware serial port ( Serial ) for debugging via the Arduino IDE Serial Monitor.
Send temperature every 60 seconds, then sleep the Arduino + JDY-40. Useful for identifying specific nodes in a network
digitalWrite(2, LOW); // Enter AT mode digitalWrite(3, LOW); // Wake module (CS low)
The JDY-40 is a compact, low‑cost 2.4GHz wireless serial transceiver module that acts as a transparent wireless UART bridge. It allows two Arduino boards (or any microcontroller with a serial interface) to communicate wirelessly without any complicated protocol stack, Bluetooth pairing, or WiFi network configuration. Simply put, it replaces a physical serial cable with a wireless link, making it an ideal choice for IoT sensors, remote controls, robotics, and home automation projects.