To change settings (like baud rate or channel), you must pull the pin to GND . Commands must be followed by \r\n (Carriage Return and Line Feed). Simple Wireless Serial Communication - - Notes To Self
Before diving into the code, it helps to understand why the JDY-40 is becoming a favorite among micro-electronics hobbyists:
: Sets the wireless network ID. Both modules must match. Example: AT+RFID12345678 .
: Program each remote node to ignore any message where the "destination" does not match its own hardcoded ID for connecting the Arduino Nano