Update README.md

Disable conversion function when not building for ESP8266
This commit is contained in:
Rick Watson 2018-11-11 20:10:21 +00:00
parent b00660533d
commit 2f508c738f
2 changed files with 29 additions and 1 deletions

View File

@ -4,6 +4,8 @@ A simple, extensible framework for getting up and running with the ESP8266/ESP32
Designed to work with the PlatformIO IDE with limited setup. Designed to work with the PlatformIO IDE with limited setup.
This project supports ESP8266 and ESP32 devices, see build instruction below for more details.
## Why I made this project ## Why I made this project
I found I was repeating a lot of work when starting new IoT projects with the ESP8266 chip. I found I was repeating a lot of work when starting new IoT projects with the ESP8266 chip.
@ -73,6 +75,30 @@ The endpoint root path can be found in Endpoint.js (./interface/src/constants/).
CORS can be enabled on the back end by uncommenting the -D ENABLE_CORS build flag in platformio.ini and re-deploying. CORS can be enabled on the back end by uncommenting the -D ENABLE_CORS build flag in platformio.ini and re-deploying.
## Building for different devices
This project supports ESP8266 and ESP32 platforms however your target device will need at least a 1MB flash chip to support OTA programming.
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:
```
[env:esp12e]
platform = espressif8266
board = esp12e
```
If you want to build for an ESP32 device, all you need to do is re-configure playformio.ini with your devices settings:
```
[env:node32s]
platform = espressif32
board = node32s
```
Microcontroller ESP8266
Frequency 80MHz
Flash 4MBl
## Configuration & Deployment ## Configuration & Deployment
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. 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.

View File

@ -40,6 +40,7 @@ void WiFiScanner::listNetworks(AsyncWebServerRequest *request) {
} }
} }
#if defined(ESP8266)
/* /*
* Convert encryption type to standard used by ESP32 rather than the translated form which the esp8266 libaries expose. * Convert encryption type to standard used by ESP32 rather than the translated form which the esp8266 libaries expose.
* *
@ -60,3 +61,4 @@ uint8_t WiFiScanner::convertEncryptionType(uint8_t encryptionType){
} }
return -1; return -1;
} }
#endif