-->
Page 1 of 2

ESP HC-SR04 ULTRASONIC

PostPosted: Sat Oct 17, 2015 8:39 am
by danbicks
Hi Guys,

Did anyone manage to find or create a library for the ultrasonic sensors that works with the standard ESP Arduino IDE not NodeMCU!

I have read through lots of posts but can't seem to find one that is ready to go.

Cheers people

Dans

Re: ESP HC-SR04 ULTRASONIC

PostPosted: Sat Oct 17, 2015 1:52 pm
by mrburnette

Re: ESP HC-SR04 ULTRASONIC

PostPosted: Sat Oct 17, 2015 2:45 pm
by danbicks
mrburnette wrote:Maybe
http://www.esp8266.com/viewtopic.php?f=11&t=1503

Ray


Hi Ray,

I have downloaded this although it has not been prepared for the ESP IDE environment. It may work within Eclipse but would require me re writing my routines in Eclipse to use this library.

Thanks anyway Bud.

Dans

Re: ESP HC-SR04 ULTRASONIC

PostPosted: Sat Oct 17, 2015 7:18 pm
by mrburnette
Sorry 'bout that, my bad....

Just a thought.... i reviewed a LUA implementation of the HC-SR04 and my thinking at the moment is that making that implementation work under the ESP8266 ArduinoGUI is problematic.

Rather, I think a tiny85 managing the sonic sensor would be a good way to decouple the critical timing from the ESP8266. There are several examples of the t85 and the HC-SR04,one shown here:
http://projectsfromtech.blogspot.com/2014/01/i2c-hc-sr04-sonar-module-attiny85-i2c.html

You could easily use software serial on the t85 to send the results to the ESP. A send-only lib is available that requires only 1 pin onmthe t85:
http://forum.arduino.cc/index.php?topic=112013.0

Ray