WiFi Distance Sensor
I have tinkered with mostly every sensor I got a hold of and now I found a pretty cheap distance sensor. I decided to integrate it with the ESP8266 and get some distance measurements via WiFi.
The sensor is the HCSR04 and the specs can be found here http://www.micropik.com/PDF/HCSR04.pdf
It is very easy to integrate, just set the ESP to send a trigger signal, wait a few milliseconds, and receive the echo signal. The delay is proportional to the distance. My implementation returns the distance in meters as a floating point number (actually it will be a string as it returns it via TCP).
The module measures the distance at a heartbeat rate which is configurable and sends the value to a server and port which is also configurable. The server and port is configured up front while the heartbeat can be changed at any time by sending a TCP message to the board.
Here is the final board: