MPD(MusicPlayerDaemon) client for ESP-IDF.
MPD protocol is here.
M5Stack
git clone https://github.com/nopnop2002/esp-idf-mpd-client
cd esp-idf-mpd-client
idf.py menuconfig
idf.py flash monitor
Set the following items using menuconfig.
- CONFIG_ESP_WIFI_SSID
SSID of your wifi. - CONFIG_ESP_WIFI_PASSWORD
PASSWORD of your wifi. - CONFIG_ESP_MAXIMUM_RETRY
Maximum number of retries when connecting to wifi. - CONFIG_ESP_MPD_SERVER
IP address or mDNS name of your MPD Server. - CONFIG_ESP_FONT
The font to use. - CONFIG_ENCODER
Enable incremental rotary encoder as volume.
See below.
There is no function to create or load a playlist.
Press Left button briefly.
State is toggled.
Press and hold Left button for at least 2 seconds.
Press Middle button briefly.
Press and hold Middle button for at least 2 seconds.
Press Right button briefly.
Press and hold Right button for at least 2 seconds.
You can use incremental rotary encoder as volume.
The source code is based on here.
Encoder | M5Stack | |
---|---|---|
A-CH(CLK) | -- | GPIO21 or GROVE White Line |
B-CH(DT) | -- | GPIO22 or GROVE Yellow Line |
BUTTON(SW) | -- | N/C |
VCC | -- | 3.3V or GROVE Red Line |
GND | -- | GND or GROVE Black Line |
You can add your original fonts.
The format of the font file is the FONTX format.
Your font file is put in font directory.
Your font file is uploaded to SPIFFS partition using meke flash.
Please refer this page about FONTX format.
FontxFile yourFont[2];
InitFontx(yourFont,"/spiffs/your_font_file_name","");
uint8_t ascii[10];
strcpy((char *)ascii, "MyFont");
uint16_t color = RED;
lcdDrawString(&dev, yourFont, x, y, ascii, color);
There is a font file editor.
This can be done on Windows 10.
Developer page is here.
This library uses the following as default fonts:
- font/ILGH24XB.FNT // 12x24Dot Gothic
- font/ILMH24XB.FNT // 12x24Dot Mincyo
Changing this file will change the font.