Example program for the ESP8266Interface running Espressif Firmware
Dependencies: ESP8266Interface NetworkSocketAPI mbed
Note
This example code assumes your ESP8266 is running the Espressif Firmware. For instructions on how to update your ESP8266 to use the correct firmware see the Firmware Update Wiki Page.
This program demonstrates how to open, close, send and recv from the ESP8266 using the Network Socket API.
Diff: main.cpp
- Revision:
- 40:6a90de1da5e2
- Parent:
- 38:561e0cdbba79
- Child:
- 41:83cf71e499ee
diff -r 418427215a94 -r 6a90de1da5e2 main.cpp --- a/main.cpp Thu Feb 25 04:14:27 2016 -0600 +++ b/main.cpp Thu Feb 25 04:14:49 2016 -0600 @@ -30,7 +30,7 @@ t.attach(flash, 0.4f); printf("NetworkSocketAPI Example\r\n"); - wifi.connect("Sniffer", "Sandcastle"); + wifi.connect("ssid", "password"); const char *ip = wifi.getIPAddress(); const char *mac = wifi.getMACAddress();