Hi there ,
I have built a distance sensor to measure the level of my rainwater tank. I built it with an Arduino Nano. I use an Arduino Nano as a serial gateway as well.
The communication between the two work well. The values in my controler (FHEM) are visible.
The main problem is strange values, I get.
The values jump between 0 and 400, even if the distance changes to the sensor head.
I attache a out put from the serial console.
Don't worry about the fail. The sensor has currently no contact to it's gateway. But this is no the reason for the stange behaviour.
Ping: 386 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:386
Ping: 390 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:390
Ping: 391 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:391
Ping: 393 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:393
send: 100-100-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
Ping: 0 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:0
Ping: 0 cm
Ping: 34 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:34
Ping: 395 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:395
Ping: 398 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:398
Ping: 393 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:393
Ping: 393 cm
Ping: 0 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:0
Ping: 0 cm
Ping: 250 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:250
send: 100-100-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
Ping: 0 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:0
Ping: 0 cm
Ping: 34 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:34
Ping: 395 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:395
Ping: 390 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:390
Ping: 395 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:395
Ping: 396 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:396
Ping: 394 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:394
send: 100-100-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
Ping: 0 cm
send: 100-100-0-0 s=1,c=1,t=13,pt=2,l=2,st=fail:0