Example program for the C027Interface
Dependencies: C027Interface NetworkSocketAPI mbed
Diff: main.cpp
- Branch:
- api-changes
- Revision:
- 38:561e0cdbba79
- Parent:
- 33:b80621db4a68
- Child:
- 40:6a90de1da5e2
diff -r 55c3649e4927 -r 561e0cdbba79 main.cpp --- a/main.cpp Thu Feb 25 21:58:51 2016 +0000 +++ b/main.cpp Thu Feb 25 04:14:07 2016 -0600 @@ -21,7 +21,7 @@ DigitalOut myled(LED_GREEN); void flash(){ myled = !myled; } -ESP8266Interface wifi(D1, D0); +ESP8266Interface wifi(D1, D0, 1); TCPSocket socket(&wifi); int main() @@ -30,7 +30,7 @@ t.attach(flash, 0.4f); printf("NetworkSocketAPI Example\r\n"); - wifi.connect("ssid", "password"); + wifi.connect("Sniffer", "Sandcastle"); const char *ip = wifi.getIPAddress(); const char *mac = wifi.getMACAddress();