Simple set up and code to help avoid the usual pitfalls when starting out with the ESP8266. If you haven’t flashed your esp8266 so it can use 9600bps in software serial you can learn how here – http://www.xess.com/blog/esp8266-reflash/
It is a little long, sorry about that, I felt I needed to go through the code. Happy to answer questions if you have them.
I will try an make a library for it, I realise that libraries already exist but I would like to learn to make my own.
Get the code here – https://github.com/mrdavidjwatts/esp8266Module