diff --git a/README.md b/README.md index 8a93396..ac43039 100644 --- a/README.md +++ b/README.md @@ -148,8 +148,8 @@ _\** GPIO 16 and 17 are used by PSRAM on the WROVER modules._ --- ## Hardware setup -Hardware is connected in the **[options.h](yoRadio/options.h)** file. \ -_so that the settings are not overwritten when updating git, you need to put the file **myoptions.h** ([exsample](exsamples/myoptions.h)) in the root of the project and make settings in it_ \ +Dont edit the options.h! \ +Hardware is adjustment in the **[myoptions.h](exsamples/myoptions.h)** file. \ **Important!** You must choose between I2S DAC and VS1053 by disabling the second module in the settings: @@ -163,13 +163,7 @@ You must choose between I2S DAC and VS1053 by disabling the second module in the ```` Define display model: ````c++ -/* DISPLAY MODEL - * 0 - DUMMY - * 1 - ST7735 - * 2 - SSD1306 - * 3 - NOKIA5110 - */ -#define DSP_MODEL 1 +#define DSP_MODEL DSP_ST7735 /* default - DSP_DUMMY */ ```` The ST7735 display submodel: ````c++ @@ -193,6 +187,9 @@ Rotation of the display: --- ## Quick start +
+ +0. **[Arduino core for the ESP32](https://github.com/espressif/arduino-esp32) v2.0.0 or higgest is required!** 1. In ArduinoIDE - upload sketch data via Tools→ESP32 Sketch Data Upload ([it's here](images/board2.jpg)) 2. Upload the sketch to the board ([example of the board settings](images/board.jpg)) 3. Connect to yoRadioAP acces point with password 12345987, go to http://192.168.4.1/ configure and wifi connections. \ @@ -281,16 +278,22 @@ Work is in progress... --- ## Version history +#### v0.6.210 +- fixed choppy playback on DSP_ST7735 displays used with VS1053 +- new option PL_WITH_NUMBERS (show the number of station in the playlist) +- fixed compiling error with DSP_DUMMY option +- correction of displays GC9106 and SSD1305 + #### v0.6.202 - fixed errors in the operation of the second encoder -- rewrote [plugin example](https://github.com/e2002/yoradio/blob/main/exsamples/displayhandlers.ino) +- rewrote [plugin example](exsamples/displayhandlers.ino) - fixed compilation errors on macOS #2 #### v0.6.200 - please backup your playlist and wifi settings before updating (export) - accelerated displays up to ~30fps (everything except LCD) - corrections/additions in the WEB interface (a [full update](#update) is required) -- rewrote [plugin example](https://github.com/e2002/yoradio/blob/main/exsamples/displayhandlers.ino) +- rewrote [plugin example](exsamples/displayhandlers.ino) - fixed compilation errors on macOS - changed the logic of the second encoder (switching to the volume control mode by double click) - optimization, bug fixes diff --git a/exsamples/myoptions.h b/exsamples/myoptions.h index 74ca34b..a655de2 100644 --- a/exsamples/myoptions.h +++ b/exsamples/myoptions.h @@ -102,6 +102,8 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti //#define VOL_STEP 1 /* Volume control step */ //#define MUTE_PIN 255 /* MUTE Pin */ //#define MUTE_VAL HIGH /* Write this to MUTE_PIN when player is stopped */ +//#define PL_WITH_NUMBERS /* show the number of station in the playlist */ + /******************************************/ /* IR control */ diff --git a/images/board3.jpg b/images/board3.jpg new file mode 100644 index 0000000..6ffe094 Binary files /dev/null and b/images/board3.jpg differ diff --git a/yoRadio/config.cpp b/yoRadio/config.cpp index 674af08..4c99fc9 100644 --- a/yoRadio/config.cpp +++ b/yoRadio/config.cpp @@ -231,7 +231,13 @@ void Config::fillPlMenu(char plmenu[][40], int from, byte count) { } while (playlist.available()) { if (parseCSV(playlist.readStringUntil('\n').c_str(), sName, sUrl, sOvol)) { +#ifdef PL_WITH_NUMBERS + char buf[BUFLEN]; + sprintf(buf, "%d %s", (int)(from+c), sName); + strlcpy(plmenu[c], buf, 39); +#else strlcpy(plmenu[c], sName, 39); +#endif c++; } if (c >= count) break; diff --git a/yoRadio/display.h b/yoRadio/display.h index b712e76..26573bb 100644 --- a/yoRadio/display.h +++ b/yoRadio/display.h @@ -1,5 +1,6 @@ #ifndef display_h #define display_h +#include "options.h" #include "Arduino.h" #include diff --git a/yoRadio/options.h b/yoRadio/options.h index 2e2249e..052e0d7 100644 --- a/yoRadio/options.h +++ b/yoRadio/options.h @@ -1,7 +1,7 @@ #ifndef options_h #define options_h -#define VERSION "0.6.202" +#define VERSION "0.6.210" /******************************************************* DO NOT EDIT THIS FILE. diff --git a/yoRadio/src/displays/displayGC9106.cpp b/yoRadio/src/displays/displayGC9106.cpp index 024288b..be525f2 100644 --- a/yoRadio/src/displays/displayGC9106.cpp +++ b/yoRadio/src/displays/displayGC9106.cpp @@ -9,7 +9,7 @@ #include "../../network.h" #ifndef DEF_SPI_FREQ -#define DEF_SPI_FREQ 8000000UL /* set it to 0 for system default */ +#define DEF_SPI_FREQ 40000000 /* set it to 0 for system default */ #endif DspCore::DspCore(): Adafruit_GC9106Ex(TFT_CS, TFT_DC, TFT_RST) { diff --git a/yoRadio/src/displays/displaySSD1305.cpp b/yoRadio/src/displays/displaySSD1305.cpp index f8b7f6c..f1eb691 100644 --- a/yoRadio/src/displays/displaySSD1305.cpp +++ b/yoRadio/src/displays/displaySSD1305.cpp @@ -14,7 +14,7 @@ #define LOGO_HEIGHT 32 #ifndef DEF_SPI_FREQ -#define DEF_SPI_FREQ 7000000UL /* set it to 0 for system default */ +#define DEF_SPI_FREQ 8000000UL /* set it to 0 for system default */ #endif const char *dow[7] = {"вс","пн","вт","ср","чт","пт","сб"}; diff --git a/yoRadio/src/displays/displayST7735.cpp b/yoRadio/src/displays/displayST7735.cpp index ae8f87a..4f08ea5 100644 --- a/yoRadio/src/displays/displayST7735.cpp +++ b/yoRadio/src/displays/displayST7735.cpp @@ -12,6 +12,10 @@ #include "../../config.h" #include "../../network.h" +#ifndef DEF_SPI_FREQ +#define DEF_SPI_FREQ 40000000UL /* set it to 0 for system default */ +#endif + DspCore::DspCore(): Adafruit_ST7735(&SPI, TFT_CS, TFT_DC, TFT_RST) { } @@ -110,6 +114,7 @@ void DspCore::apScreen() { void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) { initR(DTYPE); + if(DEF_SPI_FREQ > 0) setSPISpeed(DEF_SPI_FREQ); cp437(true); invertDisplay((DTYPE==INITR_MINI160x80)?TFT_INVERT:!TFT_INVERT); fillScreen(TFT_BG);