Jdy40 Arduino Example Best -
This feature allows you to build complex systems like a multi-room sensor network where only the intended node responds to a query.
void loop() // Forward data from the Serial Monitor (PC) to the JDY-40 if (Serial.available()) char c = Serial.read(); Serial.write(c); // Optional: local echo // The JDY-40 automatically transmits the character wirelessly. jdy40 arduino example best
// Function to change the JDY-40's ID to the desired remote ID. void setRemoteID(int id) digitalWrite(2, LOW); // Enter AT mode delay(100); Serial.print("AT+RFID"); if (id < 10) Serial.print("00"); else if (id < 100) Serial.print("0"); Serial.println(id); // e.g., "AT+RFID001" delay(100); digitalWrite(2, HIGH); // Exit AT mode delay(50); This feature allows you to build complex systems