This is a port of schreibfaul1's MiniWebRadio V2 ported to gCore. It's quite a fun program. My changes include
- Support for capacitive touch I2C-based FT6236 touchscreen controller
- Support for 80 MHz VSPI interface to LCD
- gCore battery backed RTC used to provide time if a Wifi is not connected or the NTP time cannot be received (timezone set to my MST timezone)
- LCD Brightness control changed from PWM output to gCore brightness control
- SD_MMC changed to use 4-bit interface
- gCore power button can be used to stop audio playback (short press) or power down (long press)
- Made support for the IR remote even more optional as conditionally compiled code
I used the Sparkfun MAX98357A I2S Breakout and a cheap speaker I had laying around. Connections shown below. I used PlatformIO for coding and builds as schreibfaul1 recommends (see his instructions for PlatformIO installation and building the project).
You have to edit the src/common.h
file to setup your Wifi SSID and password. As schreibfaul1 explains you also have to unpack the Content_on_SD_card.zip
to a Micro-SD card and plug that into gCore. You can customize a lot by changing the files on the Micro-SD card including the list of internet radio stations.
Files I changed include src/common.h
, src/main.cpp
, lib/tftLib/tft.h
andlib/tftLib/tft.cpp
. I also added the lib/gCore
library.
Features:
- Can handle max 999 stations
- IR remote control is optional
- Obtains time from NTP
- Can used as alarmclock, has sleeptimer
- Speech the time every hour in radiomode
- If the display has a Backlight-pin You can change the brightness
- supports the Latin, Greek and Cyrillic character sets
- Community Radio Browser is integrated as a search engine
- Channel lists can be exported or imported in Excel format (for data backup).
Required HW:
- Decoder module VS1053 or external DAC (e.g. PCM5102a)
- TFT Display with Tochpad (SPI), Controller can be ILI9341 (320x240px), HX8347D (320x240px), ILI9486 (480x320px) or ILI9488 (480x320px)
- ESP32 Board (PSRAM not necessary)
- SD Card + adapter
Control is exclusively via the touchscreen or the webpage, no additional components such as switches, rotary encoders, capacitors or resistors are required
Schematic with VS1053
Schematic with external DAC
Display (Layout)
How to install: PlatformIO is definitely recommended as an IDE
New in V2:
- The audioprocess works in his own task amd must therefore be decoupled. If a VS1053 is used, it must have its own SPI bus (HSPI for VS1053 and VSPI for TFT and TP). Dropouts when drawing on the display or when the website is loading are a things of the past.
- The SD card is wired as SD_MMC to improve stability and increase speed. This means that the GPIOs cannot be chosen freely. The SD card adapter must not have any resistors as pull-ups or in series.
- Instead of the VS1053, it can be decoded using SW. Possible formats are mp3, aac, mp4 and flac (flac requires PSRAM). A DAC is required (e.g. UDA13348, MAX98357A, PCM5102A) connected via I2S.
- The display can now be 480x320px, the ILI9486 (SPI display from the Raspberry PI) is supported
- In the finished device, the SD card may be inaccessible. For this case, an FTP server is integrated. Here are the settings in Filezilla. The username and password are 'esp32' and can be changed in 'common.h'
- supports AC101 and ES8388
- WM8978 support (TTGO audioT board)
- Entry of username and password if the server expects access data, "URL|user|pwd"
- Can process local playlists in m3u format
- The ESP32 or the ESP32-S3 can be used