#pragma once #include // Pins according to https://www.instructables.com/id/NodeMCU-ESP8266-Details-and-Pinout/ // D0 = 16 // D1 = 5 // D2 = 4 // D3 = 0 // D4 = 2 // D5 = 14 // D6 = 12 // D7 = 13 // D8 = 15 // A0 = 17 // Other usable pins: // 6, 7, 8, 11 not readable // 1, 3, 6, 7, 8, 11 nor writable -> 1 (TX) and 3 (RX) can be used read-only // 9 -> S2 // 10 -> S3 #define RX 3 #define TX 1 #define SHOW_DEBUG //#define SHOW_TRACE #define FTP_DEBUG #define WIFI_SSID "Schlenz" #define WIFI_PASS "1410WischlingenPanda" #define VS1053_SLEEP_DELAY 5000 #define PIN_SD_CS D4 #define PIN_VS1053_XCS D8 #define PIN_VS1053_XRESET 16 #define PIN_MCP D3 #define PIN_VS1053_XDCS D1 #define PIN_VS1053_DREQ D2 #define PIN_RC522_CS D0 #define PIN_BTN_VOL_UP D4 #define PIN_BTN_VOL_DOWN D5 #define PIN_BTN_TRACK_NEXT D6 #define PIN_BTN_TRACK_PREV D7 #define NUM_BUTTONS 4 #define DEBOUNCE_MILLIS 200 #define VOLUME_DEFAULT 0xA0 #define VOLUME_MIN 0x60 #define VOLUME_MAX 0xC0 #define VOLUME_STEP 0x08 #define RFID_SCAN_INTERVAL 100 // Other definitions #define INFO(x, ...) Serial.printf(x, ##__VA_ARGS__) #define ERROR(x, ...) Serial.printf(x, ##__VA_ARGS__) #ifdef SHOW_DEBUG #define DEBUG(x, ...) Serial.printf(x, ##__VA_ARGS__) #else #define DEBUG(x, ...) while(0) {} #endif #ifdef SHOW_TRACE #define TRACE(x, ...) Serial.printf(x, ##__VA_ARGS__) #else #define TRACE(x, ...) while(0) {} #endif