Added WiFi options to BTCConfig.h

This commit is contained in:
rljonesau 2018-11-08 05:23:40 +11:00
parent a7b6399c30
commit 7d187b3393
4 changed files with 25 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"board": "esp32:esp32:esp32",
"port": "192.168.0.108",
"port": "192.168.0.103",
"sketch": "BTCDieselHeater.ino",
"output": "..\\build",
"configuration": "PSRAM=disabled,PartitionScheme=min_spiffs,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none"

View file

@ -11,7 +11,15 @@
#define USE_BLE_BLUETOOTH 0
#define USE_CLASSIC_BLUETOOTH 0
#define USE_WIFI 1
//////////////////////////////////////////////////////////////////////////////
// Configure WiFi options
//
// *** Presently ESP32 Bluetooth and WiFi do not co-exist well (ala don't work!) ***
// HC-05 works OK with WiFi
//
#define USE_WIFI 1
#define USE_OTA 1
#define USE_WEBSERVER 1
///////////////////////////////////////////////////////////////////////////////

View file

@ -172,10 +172,16 @@ void setup() {
DebugPort.begin(115200);
#if USE_WIFI == 1
initWifi(WiFi_TriggerPin, FAILEDSSID, FAILEDPASSWORD);
#if USE_OTA == 1
initOTA();
#endif // USE_OTA
#if USE_WEBSERVER == 1
initWebServer();
#endif
#endif // USE_WEBSERVER
#endif // USE_WIFI
pinMode(ListenOnlyPin, INPUT_PULLUP); // pin to enable passive mode
pinMode(LED_Pin, OUTPUT); // On board LED indicator
@ -229,10 +235,16 @@ void loop()
unsigned long timenow = millis();
#if USE_WIFI == 1
doWiFiManager();
#if USE_OTA == 1
DoOTA();
#endif // USE_OTA
#if USE_WEBSERVER == 1
doWebServer();
#endif
#endif //USE_WEBSERVER
#endif // USE_WIFI
// check for test commands received from PC Over USB
if(DebugPort.available()) {

View file

@ -192,6 +192,7 @@ CBluetoothESP32BLE::~CBluetoothESP32BLE()
void
CBluetoothESP32BLE::init()
{
DebugPort.println("Initialising ESP32 BLE");
// create the BLE device
BLEDevice::init("DieselHeater");