Skip to content

Commit 26ae5ea

Browse files
committed
some esp32 mods
1 parent 4924a09 commit 26ae5ea

File tree

7 files changed

+20
-9
lines changed

7 files changed

+20
-9
lines changed

HeishaMon/HeishaMon.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
21
#define LWIP_INTERNAL
32

3+
#if defined(ESP8266)
44
#include <ESP8266WiFi.h>
55
#include <ESP8266mDNS.h>
6+
#elif defined(ESP32)
7+
#include <WiFi.h>
8+
#include <ESPmDNS.h>
9+
#endif
610
#include <DNSServer.h>
711
#include <WiFiUdp.h>
812
#include <ArduinoOTA.h>

HeishaMon/commands.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define LWIP_INTERNAL
22

3-
#include <ESP8266WiFi.h>
43
#include <ArduinoJson.h>
54

65
#define DATASIZE 203

HeishaMon/decode.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include <ArduinoJson.h>
22
#include <PubSubClient.h>
3-
#include <ESP8266WiFi.h>
4-
53

64
#define MQTT_RETAIN_VALUES 1
75

HeishaMon/gpio.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
#include <PubSubClient.h>
2-
#include <ESP8266WiFi.h>
3-
1+
#if defined(ESP8266)
42
#define NUMGPIO 3
3+
#include <ESP8266WiFi.h>
4+
#include <ESP8266WiFiGratuitous.h>
5+
#elif defined(ESP32)
6+
#define NUMGPIO 0
7+
#include <WiFi.h>
8+
#include <ESPmDNS.h>
9+
#include <Update.h>
10+
#endif
511

612
struct gpioSettingsStruct {
713
unsigned int gpioPin[NUMGPIO] = {1, 3, 16};

HeishaMon/src/common/webserver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#define err_t uint8_t
6767
#endif
6868

69-
#ifndef ESP8266
69+
#if !defined(ESP8266) && !defined(ESP32)
7070
typedef struct tcp_pcb {
7171
} tcp_pcb;
7272

HeishaMon/webfunctions.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "lwip/apps/sntp.h"
1111
#include "lwip/dns.h"
1212

13-
#include <ESP8266WiFi.h>
1413
#include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson
1514
#include <time.h>
1615

HeishaMon/webfunctions.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#define LWIP_INTERNAL
22

3+
#if defined(ESP8266)
34
#include <ESP8266WiFi.h>
45
#include <ESP8266WiFiGratuitous.h>
6+
#elif defined(ESP32)
7+
#include <WiFi.h>
8+
#include <Update.h>
9+
#endif
510
#include <PubSubClient.h>
611
#include <WebSocketsServer.h>
712
#include <ArduinoJson.h>

0 commit comments

Comments
 (0)