Replies: 3 comments
-
Hmm, its pity, that I do not get any idea and help. |
Beta Was this translation helpful? Give feedback.
0 replies
-
audio_showstreamtitle(const char *info) is an event, the content of info can be written to a variable for a later time. In the example, the streamtitle is saved and displayed in the terminal every 10 seconds. #include "Arduino.h"
#include "WiFiMulti.h"
#include "Audio.h"
#include "Ticker.h"
Audio audio;
WiFiMulti wifiMulti;
Ticker tckr10;
String ssid = "xxxxx";
String password = "xxxxx";
String ST = "";
void t10s(){
Serial.printf("Streamtitle: %s\n", ST.c_str());
}
void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
wifiMulti.addAP(ssid.c_str(), password.c_str());
wifiMulti.run();
if(WiFi.status() != WL_CONNECTED){
WiFi.disconnect(true);
wifiMulti.run();
}
audio.setPinout(27, 26, 25, -1, 0);
audio.setVolume(7); // 0...21 Will need to add a volume setting in the app
audio.connecttohost("http://www.wdr.de/wdrlive/media/einslive.m3u");
tckr10.attach(10, t10s);
}
void loop(){
audio.loop();
}
// optional
void audio_showstreamtitle(const char *info){
ST = info;
Serial.printf("Streamtitle: %s\n", ST.c_str());
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Perfect....many thanks to you 😘 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
If the station or song changes the infos was set new.
Also then the info of audio_showstreamtitle.
That's normal.
But what must I do if I want to request the info into the time the song was playing , but then as char variable and only this info audio_showstreamtitle.
So , how to get only the info of audio_showstreamtitle at each time I want... ?
Kind regards
Beta Was this translation helpful? Give feedback.
All reactions