Jdy40 Arduino Example Best ❲No Login❳
Specifications:
Key advantage: Auto-pairing. Two modules at the same RF channel and baud rate automatically connect.
The JDY-40 is an incredibly robust module when paired with good code. Unlike the nRF24L01, which requires complex SPI libraries and addresses, the JDY-40 feels like a piece of wire. Copy these examples, modify the packet structure for your own sensors (DHT22, DS18B20, or even GPS), and you will have the most reliable low-cost wireless link in your workshop.
Remember: The best example is the one that handles failure gracefully. Always validate your data.
While there isn't a single "academic paper" that serves as the definitive guide, the following highly-regarded technical resources and tutorials are considered the best documentation for using the JDY-40 wireless module with Arduino. Best Technical Guides & Documentation
Detailed Setup and AT Commands: For a comprehensive technical overview, including how to configure the module via AT commands and its 128 radio channel options, refer to the Simple Wireless Serial Communication guide by Ben Emmett
. This resource is excellent for understanding current draw and power options.
Networking and Broadcast Examples: If you are looking to build a multi-node network (e.g., one hub and multiple remote nodes), Ben Emmett's JDY-40 Wireless Broadcast project provides complete Arduino and Python code examples using JSON formatting for message transmission.
Scientific Application: For a look at how the JDY-40 is used in professional research, the peer-reviewed paper "Wireless Data Acquisition System with Feedback Function" in MDPI details its integration into a data acquisition sensor, highlighting its 3.3V power requirements and energy-efficient sleep modes. Practical Implementation Resources
Video Tutorials: Ralph Bacon’s video tutorial on Wireless Serial Comms and the accompanying GitHub repository
are highly recommended for beginners. These resources demonstrate how to use the Go to product viewer dialog for this item. jdy40 arduino example best
as a "wireless USB cable" for serial debugging and data transfer.
Datasheets: 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
is a 3.3V limited device; applying 5V directly to the VCC or logic pins without a level shifter can damage the module.
Channel Interference: For stable communication between multiple links, it is best to separate their channels by at least 6 to avoid interference.
The JDY-40 is a versatile 2.4GHz wireless serial transceiver module that stands out for its simplicity, long-range capabilities (up to 120 meters), and built-in GPIO control modes. Unlike standard Bluetooth modules (like the HC-05) that typically have a 10m range, the JDY-40 acts more like a wireless serial cable, making it one of the best choices for long-distance Arduino projects. Key Specifications Operating Frequency: 2.4GHz Range: Up to 120 meters (line of sight)
Operating Voltage: 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
To get the best results, use the SoftwareSerial library so you can keep the hardware serial port for debugging.
Video #257: Serial Wireless Comms for Arduino (et al) - GitHub
JDY-040/JDY-041 module. JDY-040 module Serial Wireless transceiver info. PLEASE NOTE: this module is 3v3 limited - don't apply 5v. Lesson 36: Get Started with Bluetooth Module
Most "bad examples" fail because of power instability. The JDY-40 runs on 3.3V logic. While some modules tolerate 5V, to get the best performance, use a level shifter or a 3.3V Arduino board (like the Pro Mini 3.3V). Specifications:
For Arduino Uno (5V):
Simpler Method (SoftwareSerial): Use the hardware serial monitor for debugging.
| JDY-40 Pin | Arduino Uno | Arduino Pro Mini (3.3V) | | :--- | :--- | :--- | | VCC | 3.3V | RAW or VCC | | GND | GND | GND | | TX | Pin 2 (SoftwareSerial RX) | Pin 2 (SoftwareSerial RX) | | RX | Pin 3 (SoftwareSerial TX) | Pin 3 (SoftwareSerial TX) |
This sketch reads a button on pin 7 and sends the string "Button Pressed" to the other module.
#include <SoftwareSerial.h>SoftwareSerial jdy40(4, 3); // RX = pin 4, TX = pin 3
const int buttonPin = 7; int buttonState = 0; int lastButtonState = HIGH;
void setup() Serial.begin(9600); // Debug console jdy40.begin(9600); // JDY-40 baud rate pinMode(buttonPin, INPUT_PULLUP); Serial.println("JDY-40 Transmitter Ready");
void loop() buttonState = digitalRead(buttonPin);
// Detect falling edge (button press) if (buttonState == LOW && lastButtonState == HIGH) jdy40.println("Button Pressed!"); Serial.println("Sent: Button Pressed!"); delay(100); // Debounce lastButtonState = buttonState;
The JDY-40 is a low-cost, ultra-low power wireless serial pass-through module based on the CC2541 chip. It is often preferred over the older HC-05/HC-06 Bluetooth modules because it supports both Bluetooth 4.0 (BLE) and standard serial transparency, and it requires no complex AT command pairing process for basic data transmission.
To get the "best" results, this report recommends using the module in Transparent Transmission Mode (Pass-through) with Hardware Serial where possible.
The JDY-40 is a half-duplex, 2.4GHz wireless transceiver module. Unlike the nRF24L01, which requires managing 20+ registers via SPI, the JDY-40 communicates over UART (Serial) . To your Arduino, it looks exactly like a wire replacement.
Key Specifications:
Why choose JDY-40 over nRF24L01?
Out of the box, the JDY-40 works. But to eliminate interference and maximize range, you must configure it via AT commands.
To enter AT mode:
The following example uses the SoftwareSerial library. This is the "best" general example because it leaves the Arduino's Hardware Serial (USB) free for debugging and monitoring data on the Serial Monitor.
Scenario: The Arduino receives data wirelessly from a phone/PC and sends it back (echo) or prints it to the Serial Monitor.
#include <SoftwareSerial.h>
// Define RX and TX pins for the JDY-40
// JDY-40 TX connects to Arduino Pin 2
// JDY-40 RX connects to Arduino Pin 3
SoftwareSerial jdySerial(2, 3); // RX, TX
void setup()
// Initialize Hardware Serial for debugging via USB
Serial.begin(9600);
Serial.println("JDY-40 Bluetooth Module Test");
// Initialize SoftwareSerial for JDY-40
// Default baud rate for JDY-40 is usually 9600
jdySerial.begin(9600);
Serial.println("Waiting for Bluetooth data...");
void loop()
// 1. Read data from JDY-40 (Wireless) and send to Serial Monitor (USB)
if (jdySerial.available())
char c = jdySerial.read();
Serial.write(c);
// 2. Read data from Serial Monitor (USB) and send to JDY-40 (Wireless)
if (Serial.available())
char c = Serial.read();
jdySerial.write(c);
