A simple loop example with code to connect to wifi.
https://github.com/esp8266/source-code-examples/tree/master/basic_example