This sketch reads an analog sensor value and transmits it as a structured string packet every second.

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)

: Chip Select / Sleep Pin (Pull LOW for normal operation, pull HIGH for low-power sleep). Wiring Diagram (Arduino to JDY-40)

The example above is production-ready. Just change pin definitions, power with clean 3.3V, and you will have a wireless link in under 60 seconds.

void loop() if (Serial1.available() > 0) // If data is received wirelessly String receivedData = Serial1.readString(); // Read the data Serial.print("Received: "); Serial.println(receivedData); // Print it to Serial Monitor

Who should use it

If your JDY-40 isn't working, follow this checklist:

This example allows you to type a message in the Serial Monitor of one Arduino and see it appear on the other. It is the most reliable way to test if your modules are paired correctly. 1. Wiring Diagram JDY-40 Pin Arduino Pin Do not use 5V. Common ground. Connects to SoftwareSerial RX.

: Support for transparent transmission, IO switching, and remote control. Best Getting Started Example: Two-Way Serial Chat

Jdy40 Arduino Example Best Jun 2026

This sketch reads an analog sensor value and transmits it as a structured string packet every second.

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)

: Chip Select / Sleep Pin (Pull LOW for normal operation, pull HIGH for low-power sleep). Wiring Diagram (Arduino to JDY-40) jdy40 arduino example best

The example above is production-ready. Just change pin definitions, power with clean 3.3V, and you will have a wireless link in under 60 seconds.

void loop() if (Serial1.available() > 0) // If data is received wirelessly String receivedData = Serial1.readString(); // Read the data Serial.print("Received: "); Serial.println(receivedData); // Print it to Serial Monitor This sketch reads an analog sensor value and

Who should use it

If your JDY-40 isn't working, follow this checklist: GND Common ground

This example allows you to type a message in the Serial Monitor of one Arduino and see it appear on the other. It is the most reliable way to test if your modules are paired correctly. 1. Wiring Diagram JDY-40 Pin Arduino Pin Do not use 5V. Common ground. Connects to SoftwareSerial RX.

: Support for transparent transmission, IO switching, and remote control. Best Getting Started Example: Two-Way Serial Chat