Example program streaming accelerometer data to a websocket server over a Sprint Mobile Broadband connection
Dependencies: MMA7660 SprintUSBModem WebSocketClient mbed-rtos mbed
Revision 7:e61aa764fba4, committed 2012-10-31
- Comitter:
- chris
- Date:
- Wed Oct 31 00:40:09 2012 +0000
- Parent:
- 6:b3fc13de8f5e
- Child:
- 8:7a1b4eedbe06
- Commit message:
- Modified example to use port 443; Added viewer URL in the comments
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Oct 26 09:50:24 2012 +0000 +++ b/main.cpp Wed Oct 31 00:40:09 2012 +0000 @@ -7,13 +7,17 @@ void test(void const*) { - SprintUSBModem modem; - Websocket ws("ws://sockets.mbed.org/ws/sensors/wo"); + SprintUSBModem modem(p18); + Websocket ws("ws://sockets.mbed.org:443/ws/sensors/wo"); + // View the output at : + // http://tools.mbed.org/iot/ + // Click "show all" char json_str[100]; - Thread::wait(5000); printf("Switching power on\r\n"); + modem.power(true); + int ret = modem.connect(); if(ret) {