To use the Color OLED module, it is important to understand its coordinate system. Most computer graphics, displays, and terminals follow a similar convention - the top-left corner is the origin.
Look carefully at the graphic below. The display in the graphic shows a single white pixel in each corner of the screen. The grey text closest to each pixel represents that pixel’s coordinates. The top-left pixel is in row zero and column zero. You could also say that it’s x/y position is (0,0). Since the display is 96 pixels wide, and the first pixel is zero, the rightmost pixel is in column 95.
When we refer to the coordinates of a pixel, we use the notation (x,y), where x is how far across from left to right, and y is how far down from top to bottom.
The cursor is the point where the Color OLED module begins printing text or numbers. If you set the cursor to (0,0), it will print text beginning at the top-left corner. If you set the cursor to (2,2), it will begin printing text 2 pixels left and 2 pixels down from the top-left corner:
This test program prints the Hello World message three times, using different starting coordinates each time.
The program printed Hello World! three times, starting at different coordinates. Since the second and third prints' coordinates were close to the first, the three printings are overlapping. The background, or highlight color, of the text is transparent - you can see though it.
What color is transparent? — It depends!
If you want your text to cover up what’s underneath it, but you don’t want it to appear highlighted, set the background to match the background of the rest of the screen.
To boldly highlight text, set the font and the font background to different colors from the screen.
The screen will display: