Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

lesha-co
Copy link

@lesha-co lesha-co commented Jun 9, 2020

  • 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

@ladyada ladyada requested a review from makermelissa June 9, 2020 15:12
@lesha-co
Copy link
Author

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
Copy link
Contributor

makermelissa commented Jun 15, 2020

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
Copy link
Author

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

@makermelissa
Copy link
Contributor

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

Aleksei Kuzmichev added 2 commits June 16, 2020 15:39
Copy link
Contributor

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create an empty file inside of examples/seesaw_shield18_test/ named .leonardo.test.skip. This will allow the code to pass the checks that it is failing on. Thanks.

@makermelissa
Copy link
Contributor

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
Copy link
Author

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
Copy link

nekuneko commented Jun 30, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants