Example of using the ATT M2X back end. Connect over Wifi with the ESP8266 chip. This code sends accelerometer 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 FXOS8700Q M2XStreamClient jsonlite mbed
Fork of M2X_Nucleo411_Accel_ESP8266-wifi by
Revision 4:3c1d712dcc48, committed 2015-12-11
- Comitter:
- mbedAustin
- Date:
- Fri Dec 11 00:25:01 2015 +0000
- Parent:
- 3:694a1a67b156
- Commit message:
- made default wifi pins match K64F
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 694a1a67b156 -r 3c1d712dcc48 main.cpp --- 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() {