ArduinoIDE 1.6.7 users should read my post here.
I was browsing through eBay the other week and saw an old HTC 8525 smartphone. For some reason, when I read it had WiFi, the $10 cost seemed reasonable as I contemplated using it as a remote control for a ESP8266 project. I can now report the success of this brain-spark after wrestling with some Arduino code for a few hours. Sincere thanks to Sparkfun for posting a working '8266 sketch for setting-up the access point mode. All I had to do was to integrate the OLED code I have previously used and I had a working project.
Those of you considering replicating this project, be warned that my attempts to use my very old HP iPaq for this project did not work. The HP will connect to my home WiFi just fine but refused to connect to the ESP8266 in AP mode - even though it could "see" the device. My guess is that the HP could not manage the password, but this is only a guess on my part. If you go off to eBay to buy a second-hand WiFi phone, try and stay with something that is no older than the HTC: 4Q2006; newer would be even better.
The basis for the hardware buildout is my first ESP8266 project published here on Hackster.io You will need an ESP8266-01 or any of the more capable varieties that break out more pins for I/O. If you are going to purchase an ESP8266 board, you may wish to consider offerings by Sparkfun or Adafruit as both of these companies offer support in the event of problems; up to and including replacement. That being said, I purchased my ESP8266 from AliExpress and I consider the $2.50 USD well spent.
I used Arduino 1.6.6 with the ESP8266 Add-in from: https://github.com/esp8266/Arduino
Similar steps are required for an iPhone or Android device. Locate the WiFi connectivity menu and open it. Find the WiFi configuration Icon.
You will need to select the SSID of the ESP8255 Access Point and you will need to supply the password which defaults to "sparkfun". The SSID will begin with ESP and will conclude with what may appear as random numbers but these are actually part of the MAC address embedded in the microcontroller's RF section. The next few slides will be the procedure on the $10 second-hand HTC smartphone.
Generally: Windows smart devices will have Internet Explorer, iPhone devices will have Safari, and Android devices will have Chrome. Once the handheld device indicates that you have a good WiFi connections, navigate to the appropriate browser. Once connected, we will point the browser to HTTP://192.168.4.1 which is a webserver running on our ESP8266 Access Point.
As a retired technologist and architect, I really should not be shocked by the power of the new Internet Connected Devices, IoT, but I am! No matter how I envision this revolution, I still find it amazing that an Access Point, a Web Server, and a client can all run on a $2.50 (delivered to my front door) chip. Add a $4 OLED display for logging and the PC is no longer needed. What a great time to be alive.
In addition to the /read command, two other commands have been programmed into the firmware to manipulate pin #12 on devices that bring out this I/O line - the ESP8266-01 does not, however: GPIO-0 and GPIO-2 are the only lines available for the -01 device and they are being used for the I2C connections on the OLED. The other two commands are:
/led/0 : Turn Off a LED if connected to I/O pin #12 (bring #12 Low)
/led/1 : Turn On a LED if connected to I/O pin #12 (bring #12 High)
The above On/Off commands are relative to pin #12 being a "source" connection to the LED. If pin #12 is a "sink" connection, then the logic shown above is reversed.
By using a ESP8266 as an Access Point, your home WiFi is never utilized and there is absolutely no Internet connection available in this example. However, Internet connectivity can be managed by connecting the ESP8266 as a "client" to your Home/Work WiFi router while still using the ESP8266 as an Access Point. Such a configuration can be used to both manage the ESP8266's I/O lines while also connecting over the Internet to secure additional information: perhaps weather or date-time.
The possibilities are not endless as the internal resources of the ESP8266 can be consumed rather quickly, but with simple web pages and no-fluff configurations, the device can be very capable.
This concludes my fourth installment on the ESP8266. For those wanting to advance beyond the overview I have provided, I wish to suggest the excellent article by John Lassen. John takes the ESP8266 to the next level by providing the tools and techniques to handle dynamic pages; but other than code documentation, there is no "hand holding". If you go down this rabbit hole, be prepared for a wild trip :)
To all of you who have read and "Respected" my ESP8266 projects, a sincere Thank You.