You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/readme.md
+107-1Lines changed: 107 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -285,6 +285,112 @@ The resolution is 240 x 240.
285
285
286
286
Initialized inside the main `begin()`
287
287
288
-
You can find the library documentation from Adafruit to draw [here](https://learn.adafruit.com/adafruit-gfx-graphics-library/graphics-primitives)
288
+
Colors : every color with the prefix ‘ST77XX_’ i.e. ST77XX_BLACK. Colors available from the library are BLACK, WHITE, RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, ORANGE
289
+
290
+
In order to turn on the screen you will need to add this inside the setup()
291
+
(already inside the main begin())
292
+
display.init(240, 240);
293
+
pinMode(TFT_BLACKLIGHT, OUTPUT);
294
+
digitalWrite(TFT_BLACKLIGHT,HIGH);
289
295
290
296
Colors : every color with the prefix ‘ST77XX_’ i.e. ST77XX_BLACK. Colors available from the library are BLACK, WHITE, RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, ORANGE
297
+
298
+
#### General:
299
+
300
+
Fill the entire screen with the selected color
301
+
```cpp
302
+
display.fillScreen(color)
303
+
```
304
+
305
+
Get width and height
306
+
```cpp
307
+
display.width() / height()
308
+
```
309
+
310
+
Rotates the coordinate system (number between 0 and 3)
311
+
```cpp
312
+
display.setRotation(0-3)
313
+
```
314
+
315
+
#### Text:
316
+
Set the cursor to write text in the selected pixels
317
+
```cpp
318
+
display.setCursor(screenX, screenY)
319
+
```
320
+
321
+
```cpp
322
+
display.print(text)
323
+
```
324
+
It will print the string inside in the current cursor position
325
+
326
+
```cpp
327
+
display.setTextColor(color)
328
+
```
329
+
Saves the selected color to print the text until the color is changed again
330
+
331
+
```cpp
332
+
display.setTextSize(size)
333
+
```
334
+
Sets the size of the text that is gonna be printed
335
+
336
+
```cpp
337
+
display.setTextWrap(True/False)
338
+
```
339
+
Set the auto wrap of the text, if it is not the text will not jump to the next line.
340
+
341
+
####Drawings:
342
+
Draw a Line from the start Vector to the End vector with the selected color, Use drawFastVLine() and drawFastHLine() introducing the same settings, to avoid the agular calc.
0 commit comments