Edzelf / ESP32-Radio

Internet radio based on ESP32, VS1053 and a TFT screen.
GNU General Public License v3.0
964 stars 227 forks source link

OLED SSD1306 128x32 support #514

Open thjacobs opened 1 year ago

thjacobs commented 1 year ago

Hi,

Thanks for the project, it's great.

I'm trying to use an OLED SSD1306 128x32 instead of 128x64, displaying only 4 8pixels lines, I tried changing the oled.h file:

line 13: #define SCREEN_HEIGHT 32

line 25: #define OLED_NPAG 4 // Number of pages (text lines)

line 67: // #define TFTSECS 4 // scrseg_struct tftdata[TFTSECS] = // Screen divided in 3 segments + 1 overlay // { // One text line is 8 pixels // { false, WHITE, 0, 8, "" }, // 1 top line // { false, CYAN, 8, 32, "" }, // 4 lines in the middle // { false, YELLOW, 40, 22, "" }, // 3 lines at the bottom, leave room for indicator // { false, GREEN, 40, 22, "" } // 3 lines at the bottom for rotary encoder // } ; #define TFTSECS 1 scrseg_struct tftdata[TFTSECS] = // Screen divided in 3 segments + 1 overlay { // One text line is 8 pixels { true, WHITE, 0, 64, "" }, // 4 lines in the middle } ;

line 87 #define dsp_getheight() 32 // Get height of screen

I've also emptied out the functions displaybattery, displayvolume and displaytime, but I still get lines of text so small it cannot be read.

Basically I would just like to show the streamtitle on the oled so even 2 lines of text would be good, one line with wifi/global status and one line with the streamtitle

aly-fly commented 1 year ago

Hi, I have successfully used 128x32 OLED I2C on this project. I have the implementation in my local copy, can send you by email if you are interested. But the results were bad, text is small and unreadable. So it is not worth going into this direction. Order the correct bigger LCD (they are cheap) and you will be happy. this one with SD card, 6€: https://www.aliexpress.com/item/1005002745563445.html or without SD card, 4€: https://www.aliexpress.com/item/32988162684.html