a lot of bullshit

This commit is contained in:
2021-12-14 19:22:06 +01:00
parent 1fc5a75f33
commit cd29191bb4
27 changed files with 703 additions and 551 deletions
+36
View File
@@ -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