Commit Iniziale, progetto funzionante caricato su box ETcontroller in

cantina
This commit is contained in:
2019-10-09 23:25:44 +02:00
commit c6e4e461ca
555 changed files with 118433 additions and 0 deletions

14
Eth_Com/MQTT_Com.h Normal file
View 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);