hellomqttt to thingspeak mqtt and ifttt

Dependencies:   Servo MQTTPacket FP

Committer:
jasonberry
Date:
Wed May 05 14:48:01 2021 +0000
Revision:
25:ca1b1098c77f
TEST

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jasonberry 25:ca1b1098c77f 1
jasonberry 25:ca1b1098c77f 2 #if !defined(MQTTETHERNET_H)
jasonberry 25:ca1b1098c77f 3 #define MQTTETHERNET_H
jasonberry 25:ca1b1098c77f 4
jasonberry 25:ca1b1098c77f 5 #include "MQTTmbed.h"
jasonberry 25:ca1b1098c77f 6 #include "EthernetInterface.h"
jasonberry 25:ca1b1098c77f 7 #include "MQTTSocket.h"
jasonberry 25:ca1b1098c77f 8
jasonberry 25:ca1b1098c77f 9 class MQTTEthernet : public MQTTSocket
jasonberry 25:ca1b1098c77f 10 {
jasonberry 25:ca1b1098c77f 11 public:
jasonberry 25:ca1b1098c77f 12 MQTTEthernet() : MQTTSocket(&eth)
jasonberry 25:ca1b1098c77f 13 {
jasonberry 25:ca1b1098c77f 14 eth.connect();
jasonberry 25:ca1b1098c77f 15 }
jasonberry 25:ca1b1098c77f 16
jasonberry 25:ca1b1098c77f 17 EthernetInterface& getEth()
jasonberry 25:ca1b1098c77f 18 {
jasonberry 25:ca1b1098c77f 19 return eth;
jasonberry 25:ca1b1098c77f 20 }
jasonberry 25:ca1b1098c77f 21
jasonberry 25:ca1b1098c77f 22 private:
jasonberry 25:ca1b1098c77f 23
jasonberry 25:ca1b1098c77f 24 EthernetInterface eth;
jasonberry 25:ca1b1098c77f 25
jasonberry 25:ca1b1098c77f 26 };
jasonberry 25:ca1b1098c77f 27
jasonberry 25:ca1b1098c77f 28
jasonberry 25:ca1b1098c77f 29 #endif