The ESP 8266-12 wont last long on a batteries; it uses 80 mA per hour. So to use it for last-lasting battery-powered sensors, its necessary to put it in sleep mode and, furthermore, use a stand-alone version without all the development board components. So, this post will be about how to program a stand-alone ESP 8266-12.