Ultrasonic HC-SR04 outputs incorrect dist value #6295
Replies: 1 comment
-
Posted at 2018-07-22 by Wilberforce What did yòu change A0 and A1 to and how did you wire it up? I think the values you are seeing are random values. Posted at 2018-07-22 by coyu1314 I have Posted at 2018-07-23 by DrAzzy Is the HC-SR04 code even known working on ESP8266? Because of how it has to keep yielding to do the radio stuff, timing-critical things can be problematic.... Posted at 2018-07-24 by coyu1314 I don't know if the code is working on the esp8266. Can any body share their experience with the esp8266 here? Posted at 2018-11-19 by pankleks I have same issue on esp32, just increasing numbers ... I don't think it's a bug with timing, rather Posted at 2019-09-14 by QueensCrown Same here guys. Data seems clean for second when I disconnected and connect echo pin again Posted at 2019-09-14 by @MaBecker connect pin Vcc to 5V and try again. Hint: Some use a voltage divider for the Echo pin and some don't, check this Google search used code
distance HC-SR04 to
Posted at 2019-09-14 by @MaBecker Search for the RCW-0001 ultrasonic sensor, it works with 3v3 - 5v. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-07-21 by coyu1314
Hi all, I am playing with the HC-SR04 on my esp8266 today and found that the outputted cm value doesn't seem correct at all. it looks like this(see below). a very large value returned. btw, I am completely new to this iot. but I did played with the ultrasonic sensor once with the arduino uno a while back and the distance output seems correct. so, my question is that is it possible that there's a bug in the distance calculation? I highly doubt that. but just want to make sure. If not, what am I doing wrong here? thanks in advance
I used the code straight from https://www.espruino.com/HC-SR04
output values:
Beta Was this translation helpful? Give feedback.
All reactions