ST7789 (V2) #1793
Replies: 4 comments 14 replies
-
#define CGRAM_OFFSET Example rotaion offsets are invoked here. Not sure if all these have been copied to the _2 code variant. You may need to call setRotation after tft.init() so the offsets get applied. |
Beta Was this translation helpful? Give feedback.
-
The colour problems are typically red and blue swap or inversion (blak = white and vice versa). There are setup options to correct these as they vary between suppliers. Ofsets are determined in setRotation and applied for each graphics operation, see here. What pixel pixel count w and h does your display have? Do you know what offsets are needed? Post a copy of you setup as a zip file, there may be options you have not noticed. There is a setViewport() command that can move the display origin and define a window size anywhere in the native display area so this is an alternative approach to dealing with offsets. The variables colstart etc are private so cannot be accessed from a sketch. But they could be moved to the public zone and then accessed from a sketch. ie Serial.println(tft.colstart); |
Beta Was this translation helpful? Give feedback.
-
For non-native widths and heights it is expected that this is defined in the setup, otherwise defaults may be used (240x320). So adding this will prevent over-ride: |
Beta Was this translation helpful? Give feedback.
-
Changing the init line to this: TFT_eSPI tft = TFT_eSPI(300,240); Gave me assess to the entire display. Tho there still is an offset issue. tft.setCursor(30, 20, 2); Puts the H right at the Left most of the display. (Instead of 0,20) Changing values in ST7789_Rotation.h doesn't affect the displays position. |
Beta Was this translation helpful? Give feedback.
-
I have a display that states its a ST7789V2. It works well with the library from Adafruit. But has color problems with TFT_eSPI as well as the the display image is shifted up. (with unused pixels at the bottom)
I have been looking at making modifications to the x/y size and position to the display. But making changes in Rotation.h (ST7789_2) doesn't seem to effect the outcome. Something else seems to be overwriting the changes. Any other locations I need to look at?
Beta Was this translation helpful? Give feedback.
All reactions