
Fork of Farrukh's webserver. Tested on LPC1768 and STM32f401 but should work on almost any platform.
You are viewing an older revision! See the latest version
Homepage
Run this program first to set up the ESP8266 first.
https://developer.mbed.org/users/star297/code/ESP8266-configuaration-baudrate/
You need your router ssid and password, set the CWMODE to "1" (station). Also depending on the version of ESP8266 you can change the baud rate, best to use 115200 for quicker web page updates. More set up details on that page.
Once the ESP8266 is set up, program this code and connect to a terminal to monitor what's going on.
Toggle the Digital Out radio buttons and click the 'Submit Query' button to change the pin state on the Mbed.
The state of the Digital In pins will be 'checked' if high and 'unchecked' if low. Click the 'Submit Query' button to get an update at any time.
You will need to connect a temperature sensor (DS18B20 in this case) otherwise you will end up with some random result (-625 if no sensor connected). you can change the 'gettemp()' code to your preferred sensor.
WEB page refresh times can vary from instant to a few seconds. There is a 10 second timeout, in case the ESP8266 gets WEB lock out. This will result in a full reset and restart of the Mbed.