// JDY-40 connected to pins 2 (RX) and 3 (TX) SoftwareSerial jdy40(2, 3);
| 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) | jdy40 arduino example best
: Set a common "Wireless ID" for your specific network to avoid interference from other JDY-40 users. AT+DVID : Assign a unique "Device ID" to individual modules. AT+POWE : Adjust transmit power (0–9) to save battery. Configuration with AT command - Arduino Forum // JDY-40 connected to pins 2 (RX) and
: Use a simple JSON or string format like "to": "Sensor1", "cmd": "readTemp" . Configuration with AT command - Arduino Forum :
| JDY-40 Pin | Arduino Pin | Notes | | :--- | :--- | :--- | | | 3.3V (Not 5V!) | Using 5V will eventually kill the module. | | GND | GND | Common ground is mandatory. | | TX | Pin 2 (SoftwareSerial) | Do not use hardware Serial (Pins 0/1) for data. | | RX | Pin 3 (SoftwareSerial) | Use a voltage divider (3.3V logic is safer). | | SET | Pin 4 (Optional) | Pull LOW to enter AT command mode. |
To configure the module, pull the . All commands must end with \r\n (CR+LF).