2.2V to 3.6V ( Note: 5V logic on Arduino requires a level shifter or 3.3V power) Baud Rate: Up to 19,200 bps Communication Interface: Standard TTL Serial (UART) Best Arduino Connection Example

The JDY-40 runs at 3.3V. While many users connect the TX pin directly to an Arduino’s RX (5V tolerant), you should never connect the JDY-40’s RX directly to an Arduino’s TX (5V) without a voltage divider. I recommend using a simple resistor divider (2x 10kΩ resistors) or a level shifter.

SoftwareSerial jdy40(2, 3); DHT dht(7, DHT11);

SoftwareSerial jdy40(4, 3);

This sketch listens for incoming data from the JDY-40 and prints it to the Serial Monitor.

error: Bản Quyền Mr Huynh