mrburnette wrote: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
Hi Ray,
Big thanks for this. I think it should be easy enough to use an interrupt for pin change and then calculate time based on echo received and trigger. I will look in to this, I have a really cool sketch on an UNO that uses a similar method and allows for gesture control.
The aim is to make my daughter a night light as she get's frightened at night, all she has to do is swipe her hand and the NEO pixels come on. they fade down after a period of time and then finally turn off.
Thanks for your help buddy, back to bit routines again, good old assembler
Dans