Help needed for clock example going backward, and garbage in background #2927
-
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
Beta Was this translation helpful? Give feedback.
-
Sorry for all this noise. |
Beta Was this translation helpful? Give feedback.
-
doc says: // For ST7789, ST7735, ILI9163 and GC9A01 ONLY, define the pixel width and height in portrait orientation Clock is not centered vertically and colors are bad. |
Beta Was this translation helpful? Give feedback.
-
By default the sketch centres the clock in portrait mode, not landscape. The setRotation function defines the screen rotation. The colours are inverted, (black = white). Run the included example diagnostic sketch Colour_Test, see header and use the sketch to get black and white correct. You will then have to use one of these lines in your sketch after tft.init(): tft.invertDisplay( true ); Your display also has red and green swapped, so include one of these lines in your setup, compile, upload and try the Colour_Test example again to find the correct option: -D TFT_RGB_ORDER TFT_RGB=1 ; Colour order Red-Green-Blue These problems occur because different suppliers wire the display pixels in different ways. |
Beta Was this translation helpful? Give feedback.
-
@Bodmer tft.invertDisplay( false ); solved the colour issue. -D TFT_RGB_ORDER TFT_RGB=1 ; Colour order Red-Green-Blue It's a little bit late today, but I'll try tomorrow most of the examples. Including Colour_test sketch. |
Beta Was this translation helpful? Give feedback.
-
I couldn't wait and despite the need for sleep using Colour sketch, first part of the loop using
But What can be the cause? I've tried hanging colors. It works only for the rectangles and their border. |
Beta Was this translation helpful? Give feedback.
-
I didn't read User_Setup.h until the end. |
Beta Was this translation helpful? Give feedback.
-
@Bodmer One problem remains.
Furthermore, sometimes tft.begin is used and sometimes tft.init. What's the difference? |
Beta Was this translation helpful? Give feedback.
By default the sketch centres the clock in portrait mode, not landscape. The setRotation function defines the screen rotation.
The colours are inverted, (black = white). Run the included example diagnostic sketch Colour_Test, see header and use the sketch to get black and white correct.
You will then have to use one of these lines in your sketch after tft.init():
tft.invertDisplay( true );
tft.invertDisplay( false );
Your display also has red and green swapped, so include one of these lines in your setup, compile, upload and try the Colour_Test example again to find the correct option:
-D TFT_RGB_ORDER TFT_RGB=1 ; Colour order Red-Green-Blue
-D TFT_RGB_ORDER TFT_BGR=1 ; Colour order Blue-…