Skip to content

Commit

Permalink
Removed audio
Browse files Browse the repository at this point in the history
  • Loading branch information
rzeldent committed Mar 7, 2024
1 parent 487b71e commit ea8e155
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
10 changes: 4 additions & 6 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,17 @@ monitor_rts = 0
monitor_dtr = 0
monitor_filters = esp32_exception_decoder

# Partition scheme for OTA
board_build.partitions = min_spiffs.csv

build_flags =
-Ofast
-Wall
-D 'BOARD_NAME="${this.board}"'
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
-D'LV_CONF_PATH=${platformio.include_dir}/lv_conf.h'
#-D 'CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE'
#-D 'CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG'
-D 'CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO'
-D 'LV_CONF_PATH=${platformio.include_dir}/lv_conf.h'

lib_deps =
https://github.com/rzeldent/esp32-smartdisplay#develop
https://github.com/schreibfaul1/ESP32-audioI2S

[env:esp32-1732S019C]
board = esp32-1732S019C
Expand Down
26 changes: 0 additions & 26 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

#include <esp32_smartdisplay.h>
#include <ui/ui.h>
#include <Audio.h>

#define WIFI_SSID "<your ssid>"
#define WIFI_PASSWORD "<your ap password>"
#define RADIO_URL "http://www.wdr.de/wdrlive/media/einslive.m3u"

Audio *audio;

void OnButtonClicked(lv_event_t *e)
{
Expand All @@ -30,20 +23,6 @@ void setup()
log_i("Free PSRAM: %d bytes", ESP.getPsramSize());
log_i("SDK version: %s", ESP.getSdkVersion());

#ifdef BOARD_HAS_SPEAK
// Connect to WiFi
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
if (WiFi.waitForConnectResult() == WL_CONNECTED)
{
audio = new Audio(true, I2S_DAC_CHANNEL_LEFT_EN);
audio->forceMono(true);
audio->setVolume(10);

while (!audio->connecttohost(RADIO_URL))
delay(500);
}
#endif

smartdisplay_init();

auto disp = lv_disp_get_default();
Expand All @@ -58,11 +37,6 @@ ulong next_millis;

void loop()
{
#ifdef BOARD_HAS_SPEAK
if (audio)
audio->loop();
#endif

auto const now = millis();
if (now > next_millis)
{
Expand Down

0 comments on commit ea8e155

Please sign in to comment.