Jdy40 Arduino Example Best [better]

Change the setPin configuration to on both Arduinos, or physically disconnect the wire from Pin 4 to drop the module into regular data transmission mode. The Code (Use on Both Transmitters and Receivers)

JDY-040/JDY-041 module. JDY-040 module Serial Wireless transceiver info. PLEASE NOTE: this module is 3v3 limited - don't apply 5v. Simple Wireless Serial Communication - - Notes To Self

void loop() { // 1. Handle PC -> JDY-40 Traffic if (Serial.available()) { String command = Serial.readStringUntil('\n'); command.trim(); jdy40 arduino example best

SoftwareSerial jdy(2, 3); // RX on pin 2, TX on pin 3

This guide provides the best, most reliable examples for setting up and using the JDY-40 with Arduino, covering both basic transparent transmission and configuration via AT commands. 1. Understanding the JDY-40 Module Change the setPin configuration to on both Arduinos,

Video #257: Serial Wireless Comms for Arduino (et al) - GitHub

The JDY-40 works best with 3.3V logic. If you are using a 5V Arduino (like the Uno or Nano), it is highly recommended to use a voltage divider (e.g., 1kΩ and 2kΩ resistors) on the RX pin of the JDY-40 to avoid damage. Pinout Connections JDY-40 Pin Arduino Pin 3.3V CRITICAL: DO NOT USE 5V GND GND Common Ground TXD Digital 2 SoftSerial RX RXD Digital 3 SoftSerial TX (Use Divider) CS GND Pull LOW for Communication SET GND Pull LOW for AT Mode, HIGH for Data PLEASE NOTE: this module is 3v3 limited - don't apply 5v

: Power supply (supports 2.2V to 3.6V. Use 3.3V from Arduino). GND : Ground connection. TXD : Transmit data pin (connects to Arduino RX). RXD : Receive data pin (connects to Arduino TX).

#define JDY_RX 10 #define JDY_TX 11

This sketch listens for incoming serial data from the JDY-40, parses the packet using start and end markers, and outputs the isolated integer to the serial monitor.