![](/media/cache/profiles/be6b2f6b6e7d72e528c6123f2cd5568e.jpg.50x50_q85.jpg)
Example for AV_MQTT
Diff: main.cpp
- Revision:
- 1:3bb5708ae2b9
- Parent:
- 0:ab341e0e5a21
- Child:
- 2:b9b08c7d6e12
--- a/main.cpp Thu Aug 08 16:11:52 2013 +0000 +++ b/main.cpp Thu Aug 08 16:14:26 2013 +0000 @@ -9,8 +9,6 @@ DigitalIn down(p12), left(p13), center(p14), up(p15), right(p16); -char BUFFER[150]; - void callback(char *topic, char *message) { printf("==== New PUBLISH received ====\r\n"); printf(topic); @@ -24,8 +22,7 @@ eth.init(); do printf("Connection...\r\n"); while (eth.connect() != 0); - //niMQTT client("10.41.240.6", callback, "mbed", 1883, "MBED_MQTT_TEST", "mbed_password"); - AV_MQTT client("10.41.240.6", callback, "MBED_MQTT_TEST", "mbed_password", "mbed", 1883, true); + AV_MQTT client("10.41.240.6", callback, "MBED_MQTT_TEST", "mbed_password"); while(true) { @@ -40,6 +37,4 @@ led = 1; wait(1); } -} - - +} \ No newline at end of file