The JDY-40 defaults to 9600 baud. Make sure both modules are on the same channel (default is channel 1).
#include <SoftwareSerial.h>
void loop() // ----- TRANSMIT BEST PRACTICE ----- static unsigned long lastSend = 0; if (millis() - lastSend > 2000) lastSend = millis(); jdy40 arduino example best
While Arduinos typically use 5V logic, the JDY-40 prefers 3.3V. Using a voltage divider (resistors) on the Arduino's TX line can prevent long-term damage to the module. 2. Best Code Example: Two-Way Communication The JDY-40 defaults to 9600 baud