The JDY-40 is a 2.4GHz wireless serial module often used as a "wireless serial cable" for Arduinos. It operates at 3.3V and supports a range of up to 120–150 meters. 1. Circuit Connections
void setup() Serial.begin(9600); jdy.begin(9600); Serial.println("JDY-40 Receiver Waiting...");
else if (command == "LED_OFF") digitalWrite(ledPin, LOW); Serial.println("LED turned OFF");Further reading:
Summary
The most reliable way to use the JDY-40 is as a transparent serial bridge. This allows you to send data from one Arduino and receive it on another as if they were connected by a wire. Transmitter/Receiver Sketch (Generic): jdy40 arduino example best
Pull LOW to enter AT command mode; leave HIGH/Floating for communication. 2. Arduino Code Flash this same code to Arduino boards.
AT+CLSS: Changes operating mode. A0 is standard transparent serial, while C0-C5 are for remote GPIO control. 4. Pro Tips for Better Reliability The JDY-40 is a 2
The JDY-40 is a 3.3V device. While its serial pins (RX/TX) are often tolerant to 5V Arduino logic, you must power it with 3.3V. JDY-40 Pin Arduino Pin Description VCC Power Supply (2.2V - 3.6V) GND RXD Pin 11 (SoftSerial TX) Serial input to module TXD Pin 10 (SoftSerial RX) Serial output from module SET Pin 9 (or GND for AT) Low (GND): AT Command mode; High: Data mode CS Low: Awake; High: Sleep mode 2. Best Code Example: Transparent Serial
Copyright PEI Media
Not for publication, email or dissemination