From 9235b7ee1da8e33061ebc58fde56ee8215599163 Mon Sep 17 00:00:00 2001 From: Chaerne <99126886+FinianLandes@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:04:18 +0100 Subject: [PATCH] Create login_with_rft.ino --- .../login_with_rft.ino | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/Login with refresh token/login_with_rft.ino diff --git a/examples/Login with refresh token/login_with_rft.ino b/examples/Login with refresh token/login_with_rft.ino new file mode 100644 index 0000000..819b457 --- /dev/null +++ b/examples/Login with refresh token/login_with_rft.ino @@ -0,0 +1,25 @@ +#include +#include +#include "SpotifyESP32.h" +#include "config.h" +using namespace Spotify_types; + +Spotify sp(CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN); +void setup() { + Serial.begin(115200); + connect_to_wifi(); +} + +void loop() { + // put your main code here, to run repeatedly: +} +void connect_to_wifi(){ + WiFi.begin(SSID, PASSWORD); + Serial.print("Connecting to WiFi..."); + while (WiFi.status() != WL_CONNECTED) { + delay(1000); + Serial.print("."); + } + Serial.printf("\nConnected to WiFi\n"); +} +