Screen Coordinates
The coordinate system on this display works exactly the way it did on the OLED. The origin (0,0)
is the upper-left corner, x grows to the right, and y grows downward — the opposite of the
graphs you draw in math class.
What is new is much stranger: the upper-left corner is not there.
A Square of Pixels Behind a Circle of Glass
The GC9A01 controller addresses a 240 by 240 square of pixels. The glass in front of it is the
circle inscribed in that square. Pixel (0,0) is a real, addressable, paid-for pixel — and you
will never see it. Nothing warns you.
x and y Are No Longer Independent
On a rectangle, any x from 0 to 127 worked with any y from 0 to 63. Here, whether an x is usable depends entirely on the y you pair it with. That one sentence explains most of the surprises in this kit.
These are the landmarks worth memorizing before you place anything:
| Landmark | Value |
|---|---|
| Center of the screen and of the circle | (120, 120) |
| Physical edge of the glass | radius 120 |
config.SAFE_RADIUS — comfortably inside the bezel |
112 |
| Corner of the addressable square | radius ≈ 170 — never visible |
That last row is the whole lesson. A corner of the square sits 120 × 1.414 ≈ 170 pixels from the center, and the glass stops at 120. Fifty pixels of your drawing surface simply do not exist.
When you are placing something near the rim and are not sure whether it will survive,
config.inside_circle(x, y) does the arithmetic for you:
1 2 | |
Sample Program Code
This program draws proof. The four corner dots and their labels go exactly where the OLED kit put them, and then a ring shows you which of them survived.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
Here's what that program draws on the display:

Count the corner labels you can read. The program asked for four of them, in the four places a rectangular display would have had corners, and the circle kept almost nothing.
Why the Axes Run Through the Middle
Notice that the horizontal and vertical rules are drawn through the center, not along the edges. On a round screen the edges of the square are exactly the part you cannot see, so a ruler along the top edge would be a ruler nobody can read.
That is the general rule this kit follows everywhere: on a round display, work outward from the center, not inward from a corner.
| Rectangular habit | Round-screen version |
|---|---|
Put a label at (2, 2) |
Center it near the top of the circle |
| Lay out a 2 by 2 grid of shapes | Lay them out in a diamond |
| Draw a border at the screen edge | Draw a ring at config.SAFE_RADIUS |
Assume any (x, y) in range is visible |
Check config.inside_circle(x, y) |
Find Your Own Safe Radius
Move one corner label toward the center, ten pixels at a time, until it appears. The distance you land on is the real edge of your usable area — and it is what config.SAFE_RADIUS is set to.
Things to Try
- Do the arithmetic, then check it. A corner of the square is 170 pixels from the center and the glass stops at 120. Predict how much of each corner marker survives before you look.
- Walk a label inward ten pixels at a time until it is fully readable, as in the tip above.
- Break the independence rule on purpose. Pick
y = 20and find the smallest and largestxthat are still visible at that height. Then do it again aty = 120. The two answers are nothing alike, and that gap is the shape of your screen.
References
- Drawing Pixels — the next lab, and the smallest thing you can put at a coordinate
- Five Broken Faces — where "drawn outside the circle" shows up as a bug with no error message
- OLED Screen Coordinates — the same idea on a rectangle, where every pixel is visible