Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C12832_lcd SprintUSBModem WebSocketClient mbed-rtos mbed
Fork of SprintUSBModemWebsocketTest-Temp by
Diff: main.cpp
- Revision:
- 1:380f5db5d004
- Parent:
- 0:162f8f714dcc
- Child:
- 2:72c06f2902d5
diff -r 162f8f714dcc -r 380f5db5d004 main.cpp
--- a/main.cpp Tue Oct 30 10:01:33 2012 +0000
+++ b/main.cpp Wed Oct 31 19:32:31 2012 +0000
@@ -1,12 +1,16 @@
#include "mbed.h"
#include "SprintUSBModem.h"
#include "Websocket.h"
+#include "LM75B.h"
void test(void const*)
{
+ LM75B tmp(p28,p27);
+
SprintUSBModem modem(p18);
Websocket ws("ws://sockets.mbed.org:443/ws/demo/rw");
char recv[128];
+ char msg[32];
Thread::wait(5000);
printf("Switching power on\r\n");
@@ -27,7 +31,8 @@
{
if(!(i%100))
{
- int ret = ws.send("WebSocket Hello World!");
+ sprintf(msg, "Temp = %.1f",tmp.read());
+ int ret = ws.send(msg);
if(ret<0)
{
printf("Timeout\r\n");
