Merge branch 'dev-esp32-mqtt' into dev-twi
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
// TODO: make this a config.h
|
||||
|
||||
// WI-FI
|
||||
#define SSID "your_wifi_ssid"
|
||||
#define PASSWORD "your_wifi_password"
|
||||
#define AUTH_MODE WIFI_AUTH_WPA2_PSK
|
||||
|
||||
// MQTT
|
||||
#define MQTT_ADDR "mqtt://yourmqttserver"
|
||||
#define MQTT_PORT 1883
|
||||
#define MQTT_USER "your_username"
|
||||
#define MQTT_PASS "your_password"
|
||||
|
||||
#endif
|
||||
@@ -1,9 +1,13 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef MAIN_HPP
|
||||
#define MAIN_HPP
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/event_groups.h"
|
||||
|
||||
extern volatile bool criticalErrorFlag;
|
||||
extern EventGroupHandle_t connectivity_event_group;
|
||||
|
||||
#define WIFI_CONNECTED_BIT BIT0
|
||||
#define MQTT_CONNECTED_BIT BIT1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef MQTT_HPP
|
||||
#define MQTT_HPP
|
||||
|
||||
void mqttTask(void *pvParameters);
|
||||
|
||||
#endif
|
||||
@@ -1,8 +0,0 @@
|
||||
#ifndef WIFI_CREDENTIALS_H
|
||||
#define WIFI_CREDENTIALS_H
|
||||
|
||||
#define SSID "your_wifi_ssid"
|
||||
#define PASSWORD "your_wifi_password"
|
||||
#define AUTH_MODE WIFI_AUTH_WPA2_PSK
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user