Example of using the ATT M2X back end. Connect over Wifi with the ESP8266 chip. This code sends random data to M2X. This code can be used for Any board, just change the RX/TX pins the wifi adapter is connected to.
Dependencies: ESP8266Interface M2XStreamClient jsonlite mbed
Fork of M2X_K64F_Accel_ESP8266-wifi by
Diff: main.cpp
- Revision:
- 4:3c1d712dcc48
- Parent:
- 3:694a1a67b156
- Child:
- 5:b3bcb048a5a5
--- a/main.cpp Fri Dec 11 00:19:45 2015 +0000 +++ b/main.cpp Fri Dec 11 00:25:01 2015 +0000 @@ -18,9 +18,9 @@ char m2xKey[] = "<m2x api key>"; // Your M2X API Key or Master API Key /* -* ESP8266 Wifi Config +* ESP8266 Wifi Config, connect it to D0 on Seeed Grove shield */ -ESP8266Interface wifi(D8,D2,D3,"wifi-name","wifi-password",115200); // TX,RX,Reset,SSID,Password,Baud +ESP8266Interface wifi(D1,D0,D3,"wifi-name","wifi-password",115200); // TX,RX,Reset,SSID,Password,Baud int main() {