Jdy40 Arduino Example Best Here

The most common "best" use case is , where data sent to the RX pin of one module instantly appears at the TX pin of another.

To interface the JDY-40 with an Arduino (like a Nano or Uno), use the following wiring scheme. Note that the module is ; applying 5V to the data pins without a level shifter can damage it. JDY-40 Pin Arduino Pin Description VCC Power supply (2.2V - 3.6V) GND Common Ground RXD TX (e.g., D3*) Data receive pin (3.3V logic) TXD RX (e.g., D2*) Data transmit pin SET D4 / GND / 3.3V LOW for AT Mode; HIGH for Communication Mode CS Chip Select; LOW to keep the module active

Before you can use a pair of JDY‑40 modules, you may need to configure them so that they operate on the same channel and with the same ID. The module understands a small set of AT commands, which are sent at with a newline ( \r\n ) terminator.

// Use SoftwareSerial if hardware serial is occupied, or use Serial directly. SoftwareSerial jdy(10, 11); // RX, TX jdy40 arduino example best

Before writing code, it is essential to understand the hardware. The JDY-40 operates within a 2.2V to 3.6V range and features a transmission range of up to 120 meters in open space. Module Pin Configuration Description Power Supply 2.2V - 3.6V (Do not connect directly to 5V Arduino VCC) GND Connect to Arduino GND TXD Serial Transmit Connect to Arduino RX (Use logic level shifter if 5V) RXD Serial Receive Connect to Arduino TX (Use logic level shifter if 5V) SET Mode Configuration

One of the JDY‑40’s most interesting features is its ability to control I/O pins on a remote module on the remote side. You can configure a module to act as a simple remote control receiver: when the paired transmitter sends certain byte sequences, the receiver directly sets its I/O pins HIGH or LOW. This is perfect for controlling relays, LEDs, or motors with minimal circuitry.

Because the JDY-40 is a 3.3V logic device, connecting it directly to a 5V Arduino Uno/Nano requires care. While the RX/TX pins are often 5V tolerant, using a logic level converter or a simple resistor voltage divider on the JDY-40 RXD pin ensures long-term reliability. JDY-40 Pin Arduino Uno/Nano Pin Ensure adequate current supply GND Common ground is mandatory TXD Pin 2 (Software RX) Direct connection RXD Pin 3 (Software TX) Use a 1kΩ / 2kΩ voltage divider SET Pin 4 (or GND for config) Controls AT Command mode CS Keeps module active AT Command Configuration The most common "best" use case is ,

#include <SoftwareSerial.h>

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

. Because it uses 2.4GHz RF technology (similar to an NRF24L01 but with a simplified serial interface), it broadcasts to all other JDY-40 modules on its channel automatically. The "best" example of its power is a Hub-and-Spoke sensor network JDY-40 Pin Arduino Pin Description VCC Power supply (2

Because the JDY-40 is a 3.3V logic device, connecting it directly to a 5V Arduino Uno or Nano can damage the module or cause unstable behavior. Always use a logic level converter or a resistor voltage divider on the Arduino TX to JDY-40 RX line.

The hub sequentially polls each remote node.

Imagine you have an Arduino with a temperature/humidity sensor (e.g., DHT11) in your garden, and you want to send readings to a PC in your house. Use a JDY‑40 at the sensor side and a second JDY‑40 connected to a USB‑to‑serial adapter (like CP2102 or CH340) at the PC side. The PC can then read the data with any serial terminal.