Skip to content

Tasmota SR04 sensor driver serial mode (UART) do not trigger data (A02YYUW ) #22151

Answered by DaFcz
DaFcz asked this question in Q&A
Discussion options

You must be logged in to vote

I have found solution. there is in "xsns_22_sr04.ino" hardcoded baudrate to 9600
if (SR04[i].sonar_serial && SR04[i].sonar_serial->begin(9600))
But the sensor is using 115200, when it is changed, it is working as expected.

00:00:01.006 RSL: RESULT = {"SerialReceived":"FF05E0E4FF05DEE2"}
00:00:01.947 SNS: Hardware Serial
00:00:01.948 SR4-1: Mode 3
...
19:55:16.285 RSL: sensors = {"sn":{"Time":"2024-09-16T19:55:16","SR04":{"Distance":150.4}},"ver":1}

Thank you for your code and Tasmota

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DaFcz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant