a lot of bullshit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* @file network.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief Some network and MQTT stuff
|
||||
* @version 0.1
|
||||
* @date 2021-12-14
|
||||
*
|
||||
* @copyright Copyright (c) 2021
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef NETWORK_H
|
||||
#define NETWORK_H
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
|
||||
#include "networkConfig.h"
|
||||
|
||||
#define MQTT_TIME_RECONNECT 2500
|
||||
|
||||
IPAddress local_IP;
|
||||
extern IPAddress gateway;
|
||||
extern IPAddress subnet;
|
||||
extern IPAddress mqtt_server;
|
||||
|
||||
extern WiFiClient wifi_client;
|
||||
PubSubClient mqtt_client(wifi_client);
|
||||
|
||||
void setIps();
|
||||
void connectWifi();
|
||||
void setupMQTT();
|
||||
bool connectMQTT();
|
||||
void checkMQTT();
|
||||
|
||||
#endif // NETWORK_H
|
||||
Reference in New Issue
Block a user