Changed from ESP8266 to ESP32. Works much better.

HTTP server is disabled (for now).
This commit is contained in:
Fabian Schlenz 2019-11-11 05:32:41 +01:00
parent c313f6eb72
commit 2d1f049444
14 changed files with 249 additions and 180 deletions

View File

@ -9,46 +9,96 @@
"includePath": [ "includePath": [
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/include", "/Users/fabian/Documents/PlatformIO/Projects/esmp3/include",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/src", "/Users/fabian/Documents/PlatformIO/Projects/esmp3/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/lib/pubsubclient/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266mDNS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/libdeps/esp12e/MFRC522_ID63/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/lib/esp8266FTPServer",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SD/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SDFS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SdFat/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SPI",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src",
"/Users/fabian/.platformio/lib/Adafruit MCP23017 Arduino Library_ID334", "/Users/fabian/.platformio/lib/Adafruit MCP23017 Arduino Library_ID334",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Wire", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include", "/Users/fabian/Documents/PlatformIO/Projects/esmp3/lib/pubsubclient/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include", "/Users/fabian/Documents/PlatformIO/Projects/esmp3/lib/esp8266FTPServer",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SD/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SPIFFS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/variants/nodemcu", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/libdeps/esp12e/MCP23S17", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/FS/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/libdeps/esp32/MFRC522_ID63/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/config",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/app_trace",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/app_update",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/asio",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/bootloader_support",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/bt",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/coap",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/console",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/driver",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp-tls",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_adc_cal",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_event",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_http_client",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_http_server",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_https_ota",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_ringbuf",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/ethernet",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/expat",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/fatfs",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/freemodbus",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/heap",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/idf_test",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/jsmn",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/json",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/libsodium",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/log",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/mbedtls",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/mdns",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/micro-ecc",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/mqtt",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/newlib",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/nghttp",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/nvs_flash",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/openssl",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/protobuf-c",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/protocomm",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/pthread",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/sdmmc",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/smartconfig_ack",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/soc",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/spi_flash",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/spiffs",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcp_transport",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/ulp",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/vfs",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/wear_levelling",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/wifi_provisioning",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/wpa_supplicant",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/xtensa-debug-module",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32-camera",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp-face",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/fb_gfx",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/cores/esp32",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/variants/esp32",
"/Users/fabian/.platformio/lib/FastLED_ID126", "/Users/fabian/.platformio/lib/FastLED_ID126",
"/Users/fabian/.platformio/lib/PubSubClient_ID89/src", "/Users/fabian/.platformio/lib/PubSubClient_ID89/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ArduinoOTA", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/ArduinoOTA/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/DNSServer/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/AsyncUDP/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/EEPROM", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/AzureIoT/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266AVRISP/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPClient/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/BluetoothSerial/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPUpdateServer/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/DNSServer/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266LLMNR", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/EEPROM/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266NetBIOS", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/ESP32/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SSDP", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/ESPmDNS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFiMesh/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/FFat/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266httpUpdate/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/HTTPClient/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Ethernet/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/GDBStub/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/NetBIOS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/Preferences/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SPISlave/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SD_MMC/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Servo/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SimpleBLE/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/Ticker/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/TFT_Touch_Shield_V2", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/Update/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Ticker", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/esp8266/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src",
"/Users/fabian/.platformio/packages/tool-unity", "/Users/fabian/.platformio/packages/tool-unity",
"" ""
], ],
@ -57,74 +107,119 @@
"path": [ "path": [
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/include", "/Users/fabian/Documents/PlatformIO/Projects/esmp3/include",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/src", "/Users/fabian/Documents/PlatformIO/Projects/esmp3/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/lib/pubsubclient/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266mDNS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/libdeps/esp12e/MFRC522_ID63/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/lib/esp8266FTPServer",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SD/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SDFS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SdFat/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SPI",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src",
"/Users/fabian/.platformio/lib/Adafruit MCP23017 Arduino Library_ID334", "/Users/fabian/.platformio/lib/Adafruit MCP23017 Arduino Library_ID334",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Wire", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include", "/Users/fabian/Documents/PlatformIO/Projects/esmp3/lib/pubsubclient/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include", "/Users/fabian/Documents/PlatformIO/Projects/esmp3/lib/esp8266FTPServer",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SD/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SPIFFS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/variants/nodemcu", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/libdeps/esp12e/MCP23S17", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/FS/src",
"/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/libdeps/esp32/MFRC522_ID63/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/config",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/app_trace",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/app_update",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/asio",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/bootloader_support",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/bt",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/coap",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/console",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/driver",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp-tls",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_adc_cal",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_event",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_http_client",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_http_server",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_https_ota",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_ringbuf",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/ethernet",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/expat",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/fatfs",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/freemodbus",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/heap",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/idf_test",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/jsmn",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/json",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/libsodium",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/log",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/mbedtls",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/mdns",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/micro-ecc",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/mqtt",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/newlib",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/nghttp",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/nvs_flash",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/openssl",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/protobuf-c",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/protocomm",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/pthread",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/sdmmc",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/smartconfig_ack",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/soc",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/spi_flash",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/spiffs",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcp_transport",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/ulp",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/vfs",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/wear_levelling",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/wifi_provisioning",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/wpa_supplicant",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/xtensa-debug-module",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32-camera",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp-face",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/fb_gfx",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/cores/esp32",
"/Users/fabian/.platformio/packages/framework-arduinoespressif32/variants/esp32",
"/Users/fabian/.platformio/lib/FastLED_ID126", "/Users/fabian/.platformio/lib/FastLED_ID126",
"/Users/fabian/.platformio/lib/PubSubClient_ID89/src", "/Users/fabian/.platformio/lib/PubSubClient_ID89/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ArduinoOTA", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/ArduinoOTA/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/DNSServer/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/AsyncUDP/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/EEPROM", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/AzureIoT/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266AVRISP/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPClient/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/BluetoothSerial/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPUpdateServer/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/DNSServer/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266LLMNR", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/EEPROM/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266NetBIOS", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/ESP32/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SSDP", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/ESPmDNS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFiMesh/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/FFat/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266httpUpdate/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/HTTPClient/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Ethernet/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/GDBStub/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/NetBIOS/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/Preferences/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SPISlave/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SD_MMC/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Servo/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/SimpleBLE/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/Ticker/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/TFT_Touch_Shield_V2", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/Update/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/Ticker", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src",
"/Users/fabian/.platformio/packages/framework-arduinoespressif8266/libraries/esp8266/src", "/Users/fabian/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src",
"/Users/fabian/.platformio/packages/tool-unity", "/Users/fabian/.platformio/packages/tool-unity",
"" ""
] ]
}, },
"defines": [ "defines": [
"PLATFORMIO=40100", "PLATFORMIO=40100",
"ESP8266", "ARDUINO_ESP32_DEV",
"ARDUINO_ARCH_ESP8266", "VERSION=\"0.1-10-g2ea2ec4-dirty\"",
"ARDUINO_ESP8266_ESP12", "ESP32",
"VERSION=\"0.1-9-g88655b5-dirty\"", "ESP_PLATFORM",
"F_CPU=80000000L", "F_CPU=240000000L",
"__ets__", "HAVE_CONFIG_H",
"ICACHE_FLASH", "MBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"",
"ARDUINO=10805", "ARDUINO=10805",
"ARDUINO_BOARD=\"PLATFORMIO_ESP12E\"", "ARDUINO_ARCH_ESP32",
"FLASHMODE_DIO", "ARDUINO_VARIANT=\"esp32\"",
"LWIP_OPEN_SRC", "ARDUINO_BOARD=\"Espressif ESP-WROVER-KIT\"",
"NONOSDK221=1",
"TCP_MSS=536",
"LWIP_FEATURES=1",
"LWIP_IPV6=0",
"VTABLES_IN_FLASH",
"" ""
], ],
"intelliSenseMode": "clang-x64", "intelliSenseMode": "clang-x64",
"cStandard": "c99", "cStandard": "c99",
"cppStandard": "c++11", "cppStandard": "c++11",
"compilerPath": "\"/Users/fabian/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gcc\" -mlongcalls -mtext-section-literals" "compilerPath": "\"/Users/fabian/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc\" -mlongcalls"
} }
], ],
"version": 4 "version": 4

8
.vscode/launch.json vendored
View File

@ -12,8 +12,8 @@
"type": "platformio-debug", "type": "platformio-debug",
"request": "launch", "request": "launch",
"name": "PIO Debug", "name": "PIO Debug",
"executable": "/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/build/esp12e/firmware.elf", "executable": "/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/build/esp32/firmware.elf",
"toolchainBinDir": "/Users/fabian/.platformio/packages/toolchain-xtensa/bin", "toolchainBinDir": "/Users/fabian/.platformio/packages/toolchain-xtensa32/bin",
"preLaunchTask": { "preLaunchTask": {
"type": "PlatformIO", "type": "PlatformIO",
"task": "Pre-Debug" "task": "Pre-Debug"
@ -24,8 +24,8 @@
"type": "platformio-debug", "type": "platformio-debug",
"request": "launch", "request": "launch",
"name": "PIO Debug (skip Pre-Debug)", "name": "PIO Debug (skip Pre-Debug)",
"executable": "/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/build/esp12e/firmware.elf", "executable": "/Users/fabian/Documents/PlatformIO/Projects/esmp3/.pio/build/esp32/firmware.elf",
"toolchainBinDir": "/Users/fabian/.platformio/packages/toolchain-xtensa/bin", "toolchainBinDir": "/Users/fabian/.platformio/packages/toolchain-xtensa32/bin",
"internalConsoleOptions": "openOnSessionStart" "internalConsoleOptions": "openOnSessionStart"
} }
] ]

View File

@ -2,24 +2,23 @@
| Device | Port | Connected to | | Device | Port | Connected to |
| ------ | ---- | ------------ | | ------ | ---- | ------------ |
| ESP | D0 | NFC: SDA | | VS1053 | CS | 16 |
| ESP | D1 | MCP: SCK (12) | | VS1053 | MISO | 19 |
| ESP | D2 | MCP: SDA (13) | | VS1053 | MOSI | 23 |
| ESP | D3 | --free-- | | VS1053 | SCK | 18 |
| ESP | D4 | --free-- | | VS1053 | XCS | 4 |
| ESP | D5 | SCK | | VS1053 | XRESET | 0 |
| ESP | D6 | MISO | | VS1053 | XDCS | 2 |
| ESP | D7 | MOSI | | VS1053 | DREQ | 15 |
| ESP | D8 | MP3: XCS | | RC522 | SDA | 17 |
| MCP | B7 | MP3: XRESET | RC522 | SCK | 18 |
| MCP | B6 | AMP1: SD | RC522 | MOSI | 23 |
| MCP | B5 | AMP2: SD | RC522 | MISO | 19 |
| MCP | B4 | MP3: XDCS | AMP_L | SD | 27 |
| MCP | B3 | MP3: CS | AMP_R | SD | 26 |
| MCP | B2 | MP3: DREQ | BTN_PREV | | 22 |
| MCP | A0 | BTN_PREV | BTN_NEXT | | 33 |
| MCP | A1 | BTN_VOL_UP | BTN_VOL_UP | | 21 |
| MCP | A2 | BTN_VOL_DOWN | BTN_VOL_DOWN | | 32 |
| MCP | A3 | BTN_NEXT
Buttons pull to GND if pushed -> Internal Pull-Up needed! Buttons pull to GND if pushed -> Internal Pull-Up needed!

View File

@ -5,12 +5,10 @@
#include "player.h" #include "player.h"
#include "mqtt_client.h" #include "mqtt_client.h"
#include <MFRC522.h> #include <MFRC522.h>
#include <Adafruit_MCP23017.h>
class Controller { class Controller {
private: private:
MFRC522* _rfid; MFRC522* _rfid;
Adafruit_MCP23017* _mcp;
SPIMaster* _spi; SPIMaster* _spi;
MQTTClient* _mqtt_client; MQTTClient* _mqtt_client;
bool _rfid_enabled = true; bool _rfid_enabled = true;
@ -32,7 +30,7 @@ private:
unsigned long _last_mqtt_report_at = 0; unsigned long _last_mqtt_report_at = 0;
void _send_mqtt_report(); void _send_mqtt_report();
public: public:
Controller(Player* p, Adafruit_MCP23017* m, SPIMaster* s); Controller(Player* p, SPIMaster* s);
void set_mqtt_client(MQTTClient* m); void set_mqtt_client(MQTTClient* m);
String get_status_json(); String get_status_json();
void loop(); void loop();

View File

@ -1,3 +1,4 @@
/*
#pragma once #pragma once
#include <ESP8266WebServer.h> #include <ESP8266WebServer.h>
#include "player.h" #include "player.h"
@ -25,3 +26,4 @@ public:
HTTPServer(Player* p, Controller* c); HTTPServer(Player* p, Controller* c);
void loop(); void loop();
}; };
*/

View File

@ -2,7 +2,7 @@
#include "config.h" #include "config.h"
#include <PubSubClient.h> #include <PubSubClient.h>
#include <ESP8266WiFi.h> #include <WiFiClient.h>
class MQTTClient { class MQTTClient {
private: private:

View File

@ -77,11 +77,10 @@ private:
uint8_t _volume; uint8_t _volume;
uint16_t _stop_delay; uint16_t _stop_delay;
uint32_t _skip_to; uint32_t _skip_to;
Adafruit_MCP23017* _mcp;
SPIMaster* _spi; SPIMaster* _spi;
unsigned long _stopped_at; unsigned long _stopped_at;
public: public:
Player(Adafruit_MCP23017* m, SPIMaster* s); Player(SPIMaster* s);
void vol_up(); void vol_up();
void vol_down(); void vol_down();
void track_next(); void track_next();

View File

@ -5,11 +5,8 @@
#include "config.h" #include "config.h"
class SPIMaster { class SPIMaster {
private:
Adafruit_MCP23017* _mcp;
public: public:
SPIMaster(Adafruit_MCP23017* m) { SPIMaster() {
_mcp = m;
PIN_SD_CS_SETUP(); PIN_SD_CS_SETUP();
PIN_VS1053_XCS_SETUP(); PIN_VS1053_XCS_SETUP();
PIN_VS1053_XDCS_SETUP(); PIN_VS1053_XDCS_SETUP();

View File

@ -1,8 +0,0 @@
#include <Adafruit_MCP23017.h>
#include "config.h"
void print_mcp_status(Adafruit_MCP23017* mcp) {
DEBUG(" AAAAAAAA BBBBBBBB\n");
DEBUG(" 76543210 76543210\n");
DEBUG("State of MCP pins: %08s %08s\n", String(mcp->readGPIO(0), 2).c_str(), String(mcp->readGPIO(1), 2).c_str());
}

View File

@ -8,13 +8,13 @@
; Please visit documentation for the other options and examples ; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html ; https://docs.platformio.org/page/projectconf.html
[env:esp12e] [env:esp32]
platform = espressif8266 platform = espressif32
board = esp12e board = esp-wrover-kit
framework = arduino framework = arduino
upload_speed = 512000 upload_speed = 512000
build_flags=!./build_version.sh build_flags=!./build_version.sh
lib_deps = Adafruit MCP23017 Arduino Library lib_deps = MFRC522
upload_port = /dev/cu.wchusbserial1420 upload_port = /dev/cu.SLAB_USBtoUART
monitor_speed = 74480 monitor_speed = 74480
monitor_port = /dev/cu.wchusbserial1420 ;monitor_port = /dev/cu.wchusbserial1420

View File

@ -2,11 +2,10 @@
#include "spi_master.h" #include "spi_master.h"
#include "config.h" #include "config.h"
Controller::Controller(Player* p, Adafruit_MCP23017* m, SPIMaster* s) { Controller::Controller(Player* p, SPIMaster* s) {
_player = p; _player = p;
_mcp = m;
_spi = s; _spi = s;
_rfid = new MFRC522(D0, MFRC522::UNUSED_PIN); _rfid = new MFRC522(17, MFRC522::UNUSED_PIN);
BTN_NEXT_SETUP(); BTN_NEXT_SETUP();
BTN_PREV_SETUP(); BTN_PREV_SETUP();

View File

@ -1,3 +1,4 @@
/*
#include "http_server.h" #include "http_server.h"
HTTPServer::HTTPServer(Player* p, Controller* c) { HTTPServer::HTTPServer(Player* p, Controller* c) {
@ -121,3 +122,4 @@ void HTTPServer::loop() {
_http_server->handleClient(); _http_server->handleClient();
MDNS.update(); MDNS.update();
} }
*/

View File

@ -1,8 +1,7 @@
#include <Arduino.h> #include <Arduino.h>
#include <SPI.h> #include <SPI.h>
#include <SD.h> #include <SD.h>
#include <Wire.h> #include <WiFi.h>
#include <Adafruit_MCP23017.h>
#include "config.h" #include "config.h"
#include "controller.h" #include "controller.h"
#include "player.h" #include "player.h"
@ -13,8 +12,7 @@
Controller* controller; Controller* controller;
Player* player; Player* player;
Adafruit_MCP23017* mcp; //HTTPServer* http_server;
HTTPServer* http_server;
FtpServer* ftp_server; FtpServer* ftp_server;
MQTTClient* mqtt_client; MQTTClient* mqtt_client;
unsigned long last_mqtt_report = 0; unsigned long last_mqtt_report = 0;
@ -22,7 +20,7 @@ unsigned long last_mqtt_report = 0;
void setup() { void setup() {
delay(500); delay(500);
Serial.begin(74880); Serial.begin(74880);
/*Serial.println("Starting..."); Serial.println("Starting...");
Serial.println("Started."); Serial.println("Started.");
INFO("Starting.\n"); INFO("Starting.\n");
#ifdef VERSION #ifdef VERSION
@ -32,30 +30,10 @@ void setup() {
#endif #endif
INFO("Initializing...\n"); INFO("Initializing...\n");
DEBUG("Setting up MCP...\n");*/
Wire.begin();
Wire.setClock(1700000);
uint8_t addr = MCP23017_ADDRESS + MCP_I2C_ADDR;
while(true) {
Wire.beginTransmission(addr);
byte status = Wire.endTransmission();
if (status==0) {
DEBUG("I2C device found.");
break;
}
DEBUG("No I2C device found.");
delay(100);
}
mcp = new Adafruit_MCP23017();
mcp->begin(MCP_I2C_ADDR);
INFO("MCP initialized.\n");
DEBUG("Setting up SPI...\n"); DEBUG("Setting up SPI...\n");
SPI.begin(); SPI.begin();
SPI.setHwCs(false); SPI.setHwCs(false);
SPIMaster* spi = new SPIMaster(mcp); SPIMaster* spi = new SPIMaster();
INFO("SPI initialized.\n"); INFO("SPI initialized.\n");
DEBUG("Setting up SD card...\n"); DEBUG("Setting up SD card...\n");
@ -68,8 +46,8 @@ void setup() {
spi->select_sd(false); spi->select_sd(false);
DEBUG("Initializing Player and Controller...\n"); DEBUG("Initializing Player and Controller...\n");
player = new Player(mcp, spi); player = new Player(spi);
controller = new Controller(player, mcp, spi); controller = new Controller(player, spi);
INFO("Player and controller initialized.\n"); INFO("Player and controller initialized.\n");
DEBUG("Connecting to wifi \"%s\"...\n", WIFI_SSID); DEBUG("Connecting to wifi \"%s\"...\n", WIFI_SSID);
@ -83,12 +61,12 @@ void setup() {
INFO("WiFi connected.\n"); INFO("WiFi connected.\n");
mqtt_client = new MQTTClient(); mqtt_client = new MQTTClient();
MDNS.begin("esmp3"); //MDNS.begin("esmp3");
controller->set_mqtt_client(mqtt_client); controller->set_mqtt_client(mqtt_client);
DEBUG("Setting up WiFi and web server...\n"); DEBUG("Setting up WiFi and web server...\n");
http_server = new HTTPServer(player, controller); //http_server = new HTTPServer(player, controller);
ftp_server = new FtpServer(); ftp_server = new FtpServer();
ftp_server->begin("user", "pass"); ftp_server->begin("user", "pass");
@ -101,7 +79,7 @@ void loop() {
if (more_data_needed) return; if (more_data_needed) return;
controller->loop(); controller->loop();
http_server->loop(); //http_server->loop();
ftp_server->handleFTP(); ftp_server->handleFTP();
mqtt_client->loop(); mqtt_client->loop();
if ((last_mqtt_report + 10000 < millis()) || last_mqtt_report > millis()) { if ((last_mqtt_report + 10000 < millis()) || last_mqtt_report > millis()) {

View File

@ -2,12 +2,10 @@
#include "player.h" #include "player.h"
#include "spi_master.h" #include "spi_master.h"
#include "tools.h"
//Player::_spi_settings //Player::_spi_settings
Player::Player(Adafruit_MCP23017* m, SPIMaster* s) { Player::Player(SPIMaster* s) {
_mcp = m;
_spi = s; _spi = s;
PIN_VS1053_XRESET_SETUP(); PIN_VS1053_XRESET_SETUP();
PIN_VS1053_XRESET(HIGH); PIN_VS1053_XRESET(HIGH);
@ -288,7 +286,8 @@ String Player::_find_album_dir(String id) {
File entry; File entry;
String result = String(""); String result = String("");
while ((result.length()==0) && (entry = root.openNextFile())) { while ((result.length()==0) && (entry = root.openNextFile())) {
String name = entry.name(); String name = entry.name() + 1;
TRACE("Checking if '%s' startsWith '%s'...\n", name.c_str(), id.c_str());
if (entry.isDirectory() && (name.startsWith(id_with_divider) || name.equals(id))) { if (entry.isDirectory() && (name.startsWith(id_with_divider) || name.equals(id))) {
result = name; result = name;
} }
@ -301,15 +300,20 @@ String Player::_find_album_dir(String id) {
std::list<String> Player::_files_in_dir(String path) { std::list<String> Player::_files_in_dir(String path) {
_spi->select_sd(); _spi->select_sd();
DEBUG("Examining folder %s...\n", path.c_str()); TRACE("Examining folder %s...\n", path.c_str());
if (!path.startsWith("/")) path = String("/") + path; if (!path.startsWith("/")) path = String("/") + path;
if (!path.endsWith("/")) path.concat("/"); //if (!path.endsWith("/")) path.concat("/");
std::list<String> result; std::list<String> result;
if (!SD.exists(path)) return result; if (!SD.exists(path)) {
DEBUG("Could not open path '%s'.\n", path.c_str());
_spi->select_sd(false);
return result;
}
File dir = SD.open(path); File dir = SD.open(path);
File entry; File entry;
while (entry = dir.openNextFile()) { while (entry = dir.openNextFile()) {
String filename = entry.name(); String filename = entry.name();
filename = filename.substring(path.length() + 1);
if (!entry.isDirectory() && if (!entry.isDirectory() &&
!filename.startsWith(".") && !filename.startsWith(".") &&
( filename.endsWith(".mp3") || ( filename.endsWith(".mp3") ||
@ -317,8 +321,8 @@ std::list<String> Player::_files_in_dir(String path) {
filename.endsWith(".wma") || filename.endsWith(".wma") ||
filename.endsWith(".mp4") || filename.endsWith(".mp4") ||
filename.endsWith(".mpa"))) { filename.endsWith(".mpa"))) {
TRACE(" Adding entry %s\n", filename.c_str()); TRACE(" Adding entry %s\n", entry.name());
result.push_back(path + filename); result.push_back(entry.name());
} else { } else {
TRACE(" Ignoring entry %s\n", filename.c_str()); TRACE(" Ignoring entry %s\n", filename.c_str());
} }
@ -410,11 +414,13 @@ void Player::_play_file(String file, uint32_t file_offset) {
_write_control_register(SCI_STATUS, _read_control_register(SCI_STATUS) & ~SS_DO_NOT_JUMP); _write_control_register(SCI_STATUS, _read_control_register(SCI_STATUS) & ~SS_DO_NOT_JUMP);
delay(100); delay(100);
_spi->select_sd();
if (file_offset == 0) { if (file_offset == 0) {
_file.seek(_id3_tag_offset(_file)); _file.seek(_id3_tag_offset(_file));
} }
_refills = 0; _refills = 0;
_current_play_position = _file.position(); _current_play_position = _file.position();
_spi->select_sd(false);
_skip_to = file_offset; _skip_to = file_offset;
if (_skip_to>0) _mute(); if (_skip_to>0) _mute();
else _speaker_on(); else _speaker_on();
@ -541,7 +547,9 @@ void Player::_refill() {
if ((status & SS_DO_NOT_JUMP) == 0) { if ((status & SS_DO_NOT_JUMP) == 0) {
DEBUG("Skipping to %d.\n", _skip_to); DEBUG("Skipping to %d.\n", _skip_to);
_flush(2048, _get_endbyte()); _flush(2048, _get_endbyte());
_spi->select_sd();
_file.seek(_skip_to); _file.seek(_skip_to);
_spi->select_sd(false);
_skip_to = 0; _skip_to = 0;
_unmute(); _unmute();
} }