Arduino training equivalents of LED "Blinky but using pub/sub and MQTT broker

Dependencies:   MQTT

Committer:
gkutsy
Date:
Sat May 10 19:39:10 2014 +0000
Revision:
2:c31806047426
Parent:
1:d55b95d9629b
starting my engine...

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gkutsy 0:9890d6036611 1
gkutsy 0:9890d6036611 2 #include <PubSubClient.h>
gkutsy 0:9890d6036611 3
gkutsy 0:9890d6036611 4 const uint8_t server[] = {107,170,104,14};
gkutsy 0:9890d6036611 5 const uint16_t port = 1883;
gkutsy 0:9890d6036611 6
gkutsy 0:9890d6036611 7 const char* username = "d0esN't_maTT3r";
gkutsy 0:9890d6036611 8 const char* password = "kgrem1432342305896";
gkutsy 0:9890d6036611 9 const char* clientId = "ClientGratzi_8523";
gkutsy 0:9890d6036611 10 const char* projectId = "LoopProjectId";
gkutsy 0:9890d6036611 11 const char* deviceName = "mbed";
gkutsy 0:9890d6036611 12 const char* jsonKV = "{Value:ON}";
gkutsy 0:9890d6036611 13
gkutsy 1:d55b95d9629b 14 void callback(char *topic, byte *payload, unsigned int length) {//callback
gkutsy 1:d55b95d9629b 15 }
gkutsy 1:d55b95d9629b 16 // no username, no password (version <= MQTT v3.0)
gkutsy 1:d55b95d9629b 17 PubSubClient litmus(server,port,callback,clientId
gkutsy 0:9890d6036611 18
gkutsy 0:9890d6036611 19 int main()
gkutsy 0:9890d6036611 20 {
gkutsy 0:9890d6036611 21
gkutsy 0:9890d6036611 22
gkutsy 0:9890d6036611 23 return 0;
gkutsy 0:9890d6036611 24 }