From d6eee244f47ca4eb8b06fc5cae896229a138ebfe Mon Sep 17 00:00:00 2001 From: Torsten Stauder Date: Mon, 14 Dec 2020 00:43:07 +0100 Subject: [PATCH] Added boards to platformio.ini + WiFi-Fix --- platformio.ini | 46 +++++++++++++++++++++++++++++++++++++++++++--- src/main.cpp | 10 +++++----- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/platformio.ini b/platformio.ini index 663174f..deace44 100644 --- a/platformio.ini +++ b/platformio.ini @@ -8,16 +8,56 @@ ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html -;[env:nodemcu-32s] [env:lolin32] platform = espressif32 -;board = nodemcu-32s board = lolin32 framework = arduino monitor_speed = 115200 board_build.partitions = no_ota.csv -;board_build.partitions = min_spiffs.csv +upload_port = /dev/cu.SLAB_USBtoUART +monitor_port = /dev/cu.SLAB_USBtoUART +[env:lolin_d32] +platform = espressif32 +board = lolin_d32 +framework = arduino +monitor_speed = 115200 +board_build.partitions = no_ota.csv +upload_port = /dev/cu.SLAB_USBtoUART +monitor_port = /dev/cu.SLAB_USBtoUART + +[env:lolin_d32_pro] +platform = espressif32 +board = lolin_d32_pro +framework = arduino +monitor_speed = 115200 +board_build.partitions = no_ota.csv +upload_port = /dev/cu.SLAB_USBtoUART +monitor_port = /dev/cu.SLAB_USBtoUART + +[env:nodemcu-32s] +platform = espressif32 +board = nodemcu-32s +framework = arduino +monitor_speed = 115200 +board_build.partitions = no_ota.csv +upload_port = /dev/cu.SLAB_USBtoUART +monitor_port = /dev/cu.SLAB_USBtoUART + +[env:az-delivery-devkit-v4] +platform = espressif32 +board = az-delivery-devkit-v4 +framework = arduino +monitor_speed = 115200 +board_build.partitions = no_ota.csv +upload_port = /dev/cu.SLAB_USBtoUART +monitor_port = /dev/cu.SLAB_USBtoUART + + +;;; Change upload/monitor-port of your board regarding your operating-system! +;MAC: /dev/cu.SLAB_USBtoUART +;WINDOWS: COM3 +;LINUX: /dev/ttyUSB0 (if it's the first USB-device attached, otherwise increase number) lib_deps = https://github.com/schreibfaul1/ESP32-audioI2S.git diff --git a/src/main.cpp b/src/main.cpp index 8f423e9..962f4e8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1881,9 +1881,9 @@ void rfidScanner(void *parameter) { nfc15693.reset(); nfc15693.setupRF(); // check for ICODE-SLIX2 password protected tag - // put your privacy password here, e.g.: + // put your privacy password here, e.g.: // https://de.ifixit.com/Antworten/Ansehen/513422/nfc+Chips+f%C3%BCr+tonies+kaufen - uint8_t password[] = {0x01, 0x02, 0x03, 0x04}; + uint8_t password[] = {0x01, 0x02, 0x03, 0x04}; ISO15693ErrorCode myrc = nfc15693.disablePrivacyMode(password); if (ISO15693_EC_OK == myrc) { Serial.println("disable PrivacyMode successful"); @@ -1916,7 +1916,7 @@ void rfidScanner(void *parameter) { } xQueueSend(rfidCardQueue, &cardIdString, 0); } - } + } } vTaskDelete(NULL); } @@ -3108,7 +3108,7 @@ wl_status_t wifiManager(void) { // Get (optional) hostname-configration from NVS String hostname = prefsSettings.getString("Hostname", "-1"); if (hostname.compareTo("-1")) { - WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE); + //WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE); WiFi.setHostname(hostname.c_str()); snprintf(logBuf, serialLoglength, "%s: %s", (char *) FPSTR(restoredHostnameFromNvs), hostname.c_str()); loggerNl(logBuf, LOGLEVEL_INFO); @@ -3713,7 +3713,7 @@ void setup() { while (!SD_MMC.begin("/sdcard", true)) { #else while (!SD.begin(SPISD_CS, spiSD)) { - #endif + #endif #else while (!SD.begin(SPISD_CS)) { #endif