Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Use WiFiMulti, (bug in ESP32 release 1.0.2 and 1.0.3)  Reason: 202 - AUTH_FAIL after reset, see espressif/arduino-esp32#2501
  • Loading branch information
schreibfaul1 authored Sep 5, 2019
1 parent 5123c0e commit 75b2d15
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions examples/I2Saudio.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "Arduino.h"
#include "WiFi.h"
#include "WiFiMulti.h"
#include "Audio.h"
#include "SPI.h"
#include "SD.h"
#include "FS.h"

Expand All @@ -14,25 +15,31 @@
#define I2S_LRC 26

Audio audio;
WiFiMulti wifiMulti;

String ssid = "Wolles-FRITZBOX";
String password = "*******";
String ssid = "xxxxxx";
String password = "xxxxxx";

void setup() {
pinMode(SD_CS, OUTPUT); digitalWrite(SD_CS, HIGH);
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
SPI.setFrequency(1000000);
Serial.begin(115200);
SD.begin(SD_CS);
WiFi.disconnect();
WiFi.mode(WIFI_STA);
WiFi.begin(ssid.c_str(), password.c_str());
while (WiFi.status() != WL_CONNECTED) delay(1500);
wifiMulti.addAP(ssid.c_str(), password.c_str());
wifiMulti.run();
if(WiFi.status() != WL_CONNECTED){
WiFi.disconnect(true);
wifiMulti.run();
}
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
audio.setVolume(21); // 0...21
audio.setVolume(12); // 0...21

//audio.connecttoSD("/320k_test.mp3");
//audio.connecttohost("www.wdr.de/wdrlive/media/einslive.m3u");
audio.connecttohost("dg-ais-eco-http-fra-eco-cdn.cast.addradio.de/hellwegradio/west/mp3/high");
//audio.connecttohost("fischkopp.stream.laut.fm/fischkopp");
//audio.connecttohost("dg-ais-eco-http-fra-eco-cdn.cast.addradio.de/hellwegradio/west/mp3/high");
//audio.connecttohost("http://macslons-irish-pub-radio.com/media.asx");
//audio.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");
}

Expand Down Expand Up @@ -80,4 +87,3 @@ void audio_eof_speech(const char *info){




0 comments on commit 75b2d15

Please sign in to comment.