adafruit / Adafruit-ST7735-Library

This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618
https://learn.adafruit.com/1-8-tft-display
550 stars 305 forks source link

Add init method for ST7735S (RGB, 80x160) #124

Open lesha-co opened 4 years ago

lesha-co commented 4 years ago
image
lesha-co commented 4 years ago

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?

makermelissa commented 4 years ago

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.

lesha-co commented 4 years ago

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

makermelissa commented 4 years ago

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

makermelissa commented 4 years ago

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

lesha-co commented 4 years ago

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

nekuneko commented 4 years ago

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.