// The calls that readme.md shows under "Configuration", in a sketch that compiles. It is not an example and not // a host test: it is built for d1_mini, with -DALEX2ESP_LOG_MAX=3, whenever that section of the readme changes. #include #include #include const char *WIFI_SSID = ""; const char *WIFI_PASSWORD = ""; const char *ALEXA_USERNAME = ""; const char *ALEXA_PASSWORD = ""; const char *ALEXA_ROOT_TOPIC = ""; Alex2ESP alexa; void setup() { Serial.begin(74880); WiFi.mode(WIFI_STA); WiFi.begin(WIFI_SSID, WIFI_PASSWORD); // Another broker than alex2mqtt.stormysdream.club:1883. The text is not copied: a literal, or a buffer that stays alexa.setServer("broker.example.org", 1883); // The sketch sets the clock itself; the library then leaves SNTP alone alexa.setTimeSource(false); // NONE, ERROR, INFO (the default) or DEBUG; DEBUG needs -DALEX2ESP_LOG_MAX=3 alexa.setLogLevel(AlexaLogLevel::DEBUG); // Where the lines go: any Print, Serial unless changed AlexaLog::setOutput(&Serial); alexa.begin(ALEXA_USERNAME, ALEXA_PASSWORD, ALEXA_ROOT_TOPIC); } void loop() { alexa.loop(); }