Skip to content

Instantly share code, notes, and snippets.

View espired's full-sized avatar

Avihay Menahem espired

  • StreamElements
  • Israel
View GitHub Profile
esp_err_t SpotifyApi::sendRequest(const String &endpoint, const String &method, String &response, const char *post_data) const
{
const int MAX_RETRIES = 3;
int retries = 0;
while (retries < MAX_RETRIES)
{
String finalUrl = "https://api.spotify.com/v1" + endpoint;
ESP_LOGI(_log_tag, "Sending request to: %s", finalUrl.c_str());
@espired
espired / spotify.ino
Created June 18, 2024 08:33
ESP32-S3 Spotify Remote Controller
#include <LilyGo_AMOLED.h>
#include <LV_Helper.h>
#include <WiFiClientSecure.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include <esp_wifi.h>
// WiFi credentials
const char* ssid = "WIFI_SSID";
@espired
espired / spotify.ino
Created June 16, 2024 07:55
Spotify current playing - esp32
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include <U8g2lib.h>
// WiFi credentials
const char* ssid = "SSID";
const char* password = "PASSWORD";
// Spotify credentials