Hi folks, I am working with a HC-SR04 sensor and a nodemcu board, want to share my experience.
My experience was that using the most basic sketch, the board’s behavior is not the most appropiate, watching the serial monitor, it seems to be “lagged” on certain opportunities.
I thougth that can be the sketch, and reading it, I think that the “delay” function can be doing something weird with thinger communication, so searching for a way to make the measurements without use of “delay” function, found the “new ping” library, specially for this kind of sensor, now the board is working flawlessly.
So I want to take advantage of the opportunity and ask, are there knowed limitations with the use of “delay” function and thinger communication? (the delay used in the original sketch was about 10 microseconds, yes, microseconds not milliseconds )
The link to download the library:
https://bitbucket.org/teckel12/arduino-new-ping/downloads/
It has a simple example… pretty simple and easy to use, and have a example to handle 15 sensor, simultaneously!
Bests