![](/media/cache/profiles/dcee66ccb49a492ae42c446c0cc01b3a.jpg.50x50_q85.jpg)
Axeda AMMMP sample code for the mbed NXP LPC1768 Prototyping Board
Dependencies: EthernetInterface mbed-rtos mbed
Dependents: AxedaGo-mbed_WIZnetInterface
Diff: main.cpp
- Revision:
- 2:3402e0dbab6b
- Parent:
- 1:16dd56f0f6c7
- Child:
- 3:359e019da3b9
diff -r 16dd56f0f6c7 -r 3402e0dbab6b main.cpp --- a/main.cpp Thu Oct 17 19:53:50 2013 +0000 +++ b/main.cpp Tue Oct 29 16:51:32 2013 +0000 @@ -70,7 +70,7 @@ printf("Sending Value %.2f\n\r", potVal); sock.connect("dev6-connect.axeda.com", 52689); - sprintf(http_cmd, "POST /axeda/data/%s!%s HTTP/1.1\r\nContent-Type: application/vnd.m2m.msgbuf-v1+json\r\nContent-Length: 49\r\n\r\n{\"data\":[{\"items\":{\"bar\":\"camp\",\"pot1\":%.2f}}]}\r\n\r\n", MODEL, SERIAL_NUM,potVal); + sprintf(http_cmd, "POST /ammp/data/1/%s!%s HTTP/1.1\r\nContent-Type: application/json\r\nContent-Length: 47\r\n\r\n{\"data\":[{\"di\":{\"bar\":\"camp\",\"pot1\":%.2f}}]}\r\n\r\n", MODEL, SERIAL_NUM,potVal); sock.send_all(http_cmd, sizeof(http_cmd)-1); while ( (returnCode = sock.receive(buffer, sizeof(buffer)-1)) > 0)