Skip to content

Commit 2f508c7

Browse files
committed
Update README.md
Disable conversion function when not building for ESP8266
1 parent b006605 commit 2f508c7

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
A simple, extensible framework for getting up and running with the ESP8266/ESP32 microchip and a react front end.
44

5-
Designed to work with the PlatformIO IDE with limited setup.
5+
Designed to work with the PlatformIO IDE with limited setup.
6+
7+
This project supports ESP8266 and ESP32 devices, see build instruction below for more details.
68

79
## Why I made this project
810

@@ -73,6 +75,30 @@ The endpoint root path can be found in Endpoint.js (./interface/src/constants/).
7375

7476
CORS can be enabled on the back end by uncommenting the -D ENABLE_CORS build flag in platformio.ini and re-deploying.
7577

78+
## Building for different devices
79+
80+
This project supports ESP8266 and ESP32 platforms however your target device will need at least a 1MB flash chip to support OTA programming.
81+
82+
By default this project is configured to build for the esp12e device. This is an esp8266 device with 4MB of flash. The following config in platformio.ini configures the build:
83+
84+
```
85+
[env:esp12e]
86+
platform = espressif8266
87+
board = esp12e
88+
```
89+
90+
If you want to build for an ESP32 device, all you need to do is re-configure playformio.ini with your devices settings:
91+
92+
```
93+
[env:node32s]
94+
platform = espressif32
95+
board = node32s
96+
```
97+
98+
Microcontroller ESP8266
99+
Frequency 80MHz
100+
Flash 4MBl
101+
76102
## Configuration & Deployment
77103

78104
Standard configuration settings, such as build flags, libraries and device configuration can be found in platformio.ini. See the [PlatformIO docs](http://docs.platformio.org/en/latest/projectconf.html) for full details on what you can do with this.

src/WiFiScanner.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ void WiFiScanner::listNetworks(AsyncWebServerRequest *request) {
4040
}
4141
}
4242

43+
#if defined(ESP8266)
4344
/*
4445
* Convert encryption type to standard used by ESP32 rather than the translated form which the esp8266 libaries expose.
4546
*
@@ -60,3 +61,4 @@ uint8_t WiFiScanner::convertEncryptionType(uint8_t encryptionType){
6061
}
6162
return -1;
6263
}
64+
#endif

0 commit comments

Comments
 (0)