you can try to use S1, S2 for RXD, TXD
S3 and S4 can't use for RXD, TXD. ONLY use for INPUT signal.
It is working with S3 and S4. Thanks.
Here is my sample ESPHome config.
------------------------------
captive_portal:
binary_sensor:
## LD2420 Sensor
- platform: ld2420
has_target:
name: Presence
sensor:
## LD 2420
- platform: ld2420
moving_distance:
name : Moving Distance
uart:
id: ld2420_radar
tx_pin: 33 #S4 KC868-A8
rx_pin: 32 #S3 KC868-A8
baud_rate: 115200
parity: NONE
stop_bits: 1
ld2420:
text_sensor:
- platform: ld2420
fw_version:
name: LD2420 Firmware
select:
- platform: ld2420
operating_mode:
name: Operating Mode
number:
- platform: ld2420
presence_timeout:
name: Detection Presence Timeout
min_gate_distance:
name: Detection Gate Minimum
max_gate_distance:
name: Detection Gate Maximum
# See "Number" section below for detail
gate_select:
name: Select Gate to Set
still_threshold:
name: Set Still Threshold Value
move_threshold:
name: Set Move Threshold Value
button:
- platform: ld2420
apply_config:
name: Apply Config
factory_reset:
name: Factory Reset
restart_module:
name: Restart Module
revert_config:
name: Undo Edits