Precision of distance sensor (hc-sr04)

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
yellowsky
Normal user
Posts: 30
Joined: 10 Dec 2016, 20:09

Precision of distance sensor (hc-sr04)

#1 Post by yellowsky » 26 May 2017, 16:38

Hi everyone.
Did i make something wrong?

In my esp i try to read distance with a hc-sr04
In the log the value is rounded with two decimal.
But once this value is sent to domoticz, the value is rounded at the unit.

I try to update manually the device in domoticz and the precision is one decimal.

Why does espeasy round too much the value?

Thank you

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Precision of distance sensor (hc-sr04)

#2 Post by grovkillen » 26 May 2017, 20:02

Please publish a screen shoot of your device settings page.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

yellowsky
Normal user
Posts: 30
Joined: 10 Dec 2016, 20:09

Re: Precision of distance sensor (hc-sr04)

#3 Post by yellowsky » 27 May 2017, 05:55

Here is
Image

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Precision of distance sensor (hc-sr04)

#4 Post by grovkillen » 27 May 2017, 14:59

I can confirm this. This plugin should be redesigned to let the user set the rounding.

This is now added as an issue.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 55 guests