Commit Iniziale, progetto funzionante caricato su box ETcontroller in
cantina
This commit is contained in:
14
Eth_Com/MQTT_Com.h
Normal file
14
Eth_Com/MQTT_Com.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <mbed.h>
|
||||
#include "MQTTClient.h"
|
||||
#include "MQTTEthernet.h"
|
||||
|
||||
|
||||
// Configuration values needed to connect to IBM IoT Cloud
|
||||
#define HOSTNAME "10.0.2.15"
|
||||
#define MQTT_MAX_PACKET_SIZE 250
|
||||
#define MQTT_MAX_PAYLOAD_SIZE 300
|
||||
#define MQTT_PORT 1883
|
||||
|
||||
void attemptConnect(MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE>* client, MQTTEthernet* ipstack);
|
||||
int publish(MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE>* client, MQTTEthernet* ipstack, char* topic, char* msg);
|
||||
|
||||
Reference in New Issue
Block a user