Adafruit-ST7735-Library icon indicating copy to clipboard operation
Adafruit-ST7735-Library copied to clipboard

Add init method for ST7735S (RGB, 80x160)

Open lesha-co opened this issue 4 years ago • 7 comments

  • I have added an initS() method that initializes ST7735S displays (RGB, 80x160). As far as I know, Adafruit doesn't sell this kind display, but this is very popular library for st77xx family, so might as well have it here.
    initS initializes it the same way initR would do for INITR_MINI160x80 and leaves tabcolor=0x00 (same as INITR_GREENTAB, which is RGB)

  • Given that there are several variations of ST7735R display, I can not disregard the possibility of the same being the case for -S displays. This method at least works for the one I have, it looks like this:

image

lesha-co avatar Jun 09 '20 12:06 lesha-co

Wait this needs more research, the display thinks it's 128px wide, due to tabcolor being 0 and setRotation doing its thing.

Perhabs it's better to add a new "tabcolor" for ST7735S displays?

lesha-co avatar Jun 15 '20 21:06 lesha-co

I'm also aware that Waveshare also makes a 1.8" display (160x128) that is based on the ST7735S, so perhaps initS might be a bit misleading.

makermelissa avatar Jun 15 '20 22:06 makermelissa

What do you think? I added a INITR_MINI160x80_RGB mode that maintains its resolution during rotations and doesn't touch color filters

lesha-co avatar Jun 16 '20 00:06 lesha-co

I like the name. I'll test and review soon. I actually have one of those displays.

makermelissa avatar Jun 16 '20 01:06 makermelissa

I tested this out using the graphicstest and used tft.initR(INITR_MINI160x80_RGB);. It appears colors are still inverted (which looks the same even with INITR_MINI160x80) and there is at least 1 column and row of uninitialized pixels, which means you will probably need to adjust your colstart and rowstart values.

The display I'm using has the same text as you have pictured on it, though the font is slightly different, so it's possible it's not exactly the same.

Could you try running graphicstest on your display to verify that it is working as you intended or if you see similar results to what I see? Thanks

makermelissa avatar Jun 16 '20 21:06 makermelissa

I ran a graphicstest (video), it looks fine to me.

there is at least 1 column and row of uninitialized pixels, which means you will probably need to adjust your colstart and rowstart values.

That's strange, I know what are you talking about, but it doesn't appear in my case. If we are actually having slightly different screens, I don't see a way to distinct them. That's sad! Here's a photo of the flipside, but there's not much in there either.

2020-06-17 03 28 18

lesha-co avatar Jun 17 '20 00:06 lesha-co

I think this display (based on ST7735S) needs more changes in order to work properly (I'm currently working on it). The ST7735S displays I have are exactly whose the website BuyDisplay sells here. The changes you perform adding the initS() method, looks like to perform the same as using initR(INITR_MINI160x80) option, I don't see any structural changes with the true init options.

That's strange, I know what are you talking about, but it doesn't appear in my case. If we are actually having slightly different screens, I don't see a way to distinct them. That's sad! Here's a photo of the flipside, but there's not much in there either.

My module's flipside looks a bit different.

IMG_20200630_171650_953

I tested this out using the graphicstest and used tft.initR(INITR_MINI160x80_RGB);. It appears colors are still inverted (which looks the same even with INITR_MINI160x80) and there is at least 1 column and row of uninitialized pixels, which means you will probably need to adjust your colstart and rowstart values.

The display I'm using has the same text as you have pictured on it, though the font is slightly different, so it's possible it's not exactly the same.

I think this multicolor lines are the unintialized pixels @makermelissa mentions.

IMG_20200630_164611_257

Could you try running graphicstest on your display to verify that it is working as you intended or if you see similar results to what I see? Thanks

I run your whole repo and I have the problem with inverted colors and unintialized pixels. Background color is white instead of black. I'm using an Arduino M0 (samd21) to control the display, and I also tested on an Arduino Micro (Atmega 32u4).

I will try too to find out what causes this issue. I hope soon to bring you good news. :)

Edit: By setting...

_colstart = 26;
_rowstart = 1;

...the uninitialized pixels lines disappears but stills the inverted color issue.

nekuneko avatar Jun 30 '20 15:06 nekuneko