Jdy40 Arduino Example Best Link
Out of the box, the JDY-40 works. But to eliminate interference and maximize range, you must configure it via AT commands.
void loop() // ----- TRANSMIT BEST PRACTICE ----- static unsigned long lastSend = 0; if (millis() - lastSend > 2000) lastSend = millis(); jdy40 arduino example best
Serial.println("JDY-40 Master/Slave Ready"); Out of the box, the JDY-40 works
In the crowded world of 2.4GHz wireless modules, the nRF24L01 often steals the spotlight. However, it comes with a notorious catch: complex configuration, pin sensitivity, and frequent “fried” modules due to 5V logic. Enter the JDY-40 — a hidden gem for Arduino enthusiasts who need simple, reliable, ultra-low-power point-to-point or broadcast communication. However, it comes with a notorious catch: complex
| Command | Function | Best Setting | | :--- | :--- | :--- | | AT+RFADDR | RF Channel (0-255) | AT+RFADDR=115 (Pick a quiet channel) | | AT+RFNETID | Network ID (0-65535) | AT+RFNETID=5678 (Avoid default 0) | | AT+BAUD | UART baud rate | AT+BAUD=9600 (Most stable) | | AT+RFMD | RF Data rate | AT+RFMD=250 (250kbps = longest range) | | AT+TRPMAX | Transmit power | AT+TRPMAX=1 (Max power) | | AT+SLEEP | Power management | AT+SLEEP=0 (Disable sleep for continuous use) |
// Optional: Set the module to transparent transmission (default mode) pinMode(4, OUTPUT); // SET pin digitalWrite(4, HIGH); // HIGH = Data mode, LOW = AT mode
// Best practice: Send structured, short packets // Never send Strings larger than the buffer (max 64 bytes per packet) jdy40.print("TEMP:"); jdy40.print(23.5); jdy40.print(";BAT:"); jdy40.println(4.12);