Skip to content

Commit

Permalink
some esp32 mods
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorYbema committed Feb 25, 2024
1 parent 4924a09 commit 26ae5ea
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
6 changes: 5 additions & 1 deletion HeishaMon/HeishaMon.ino
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@

#define LWIP_INTERNAL

#if defined(ESP8266)
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#elif defined(ESP32)
#include <WiFi.h>
#include <ESPmDNS.h>
#endif
#include <DNSServer.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
Expand Down
1 change: 0 additions & 1 deletion HeishaMon/commands.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#define LWIP_INTERNAL

#include <ESP8266WiFi.h>
#include <ArduinoJson.h>

#define DATASIZE 203
Expand Down
2 changes: 0 additions & 2 deletions HeishaMon/decode.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include <ArduinoJson.h>
#include <PubSubClient.h>
#include <ESP8266WiFi.h>


#define MQTT_RETAIN_VALUES 1

Expand Down
12 changes: 9 additions & 3 deletions HeishaMon/gpio.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#include <PubSubClient.h>
#include <ESP8266WiFi.h>

#if defined(ESP8266)
#define NUMGPIO 3
#include <ESP8266WiFi.h>
#include <ESP8266WiFiGratuitous.h>
#elif defined(ESP32)
#define NUMGPIO 0
#include <WiFi.h>
#include <ESPmDNS.h>
#include <Update.h>
#endif

struct gpioSettingsStruct {
unsigned int gpioPin[NUMGPIO] = {1, 3, 16};
Expand Down
2 changes: 1 addition & 1 deletion HeishaMon/src/common/webserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
#define err_t uint8_t
#endif

#ifndef ESP8266
#if !defined(ESP8266) && !defined(ESP32)
typedef struct tcp_pcb {
} tcp_pcb;

Expand Down
1 change: 0 additions & 1 deletion HeishaMon/webfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "lwip/apps/sntp.h"
#include "lwip/dns.h"

#include <ESP8266WiFi.h>
#include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson
#include <time.h>

Expand Down
5 changes: 5 additions & 0 deletions HeishaMon/webfunctions.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#define LWIP_INTERNAL

#if defined(ESP8266)
#include <ESP8266WiFi.h>
#include <ESP8266WiFiGratuitous.h>
#elif defined(ESP32)
#include <WiFi.h>
#include <Update.h>
#endif
#include <PubSubClient.h>
#include <WebSocketsServer.h>
#include <ArduinoJson.h>
Expand Down

0 comments on commit 26ae5ea

Please sign in to comment.