Initial commit

This commit is contained in:
2025-04-15 01:51:07 +02:00
commit fb2879b129
16 changed files with 1088 additions and 0 deletions

27
include/config.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef CONFIG_H_
#define CONFIG_H_
#include "FS.h"
#include "LittleFS.h"
#include <ArduinoJson.h>
typedef struct {
const char *ssid;
const char *psk;
const char *mqtt_host;
const char *mqtt_user;
const char *mqtt_password;
const char *topic;
const char *device_id;
int mqtt_port;
long sleep_time;
int connection_attempts;
} Config;
void initialize_config(Config *config, StaticJsonDocument<512> json);
bool load_config_file(const char *file_path, Config *config);
long minutes_to_microseconds(int minutes);
#endif // CONFIG_H_