summaryrefslogtreecommitdiff
path: root/HelloWorld
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2021-12-17 13:46:31 +0200
committerYuval Adam <_@yuv.al>2021-12-17 13:46:31 +0200
commit74b082c851303ff0a87b492c5f3c40759d1fd40c (patch)
tree9b7b1ccb39271601c09b9801b11ab3d89bb8d267 /HelloWorld
parent02ec8cc85eee4b12bf71a7aa1c1a39943e764749 (diff)
Green text center screen with Makefile for convenience
Diffstat (limited to 'HelloWorld')
-rw-r--r--HelloWorld/HelloWorld.ino18
1 files changed, 8 insertions, 10 deletions
diff --git a/HelloWorld/HelloWorld.ino b/HelloWorld/HelloWorld.ino
index 89c7ff8..ad56df4 100644
--- a/HelloWorld/HelloWorld.ino
+++ b/HelloWorld/HelloWorld.ino
@@ -1,16 +1,14 @@
-#include"TFT_eSPI.h" //include TFT LCD library
+#include"TFT_eSPI.h"
-TFT_eSPI tft; //initialize TFT LCD
+TFT_eSPI tft;
void setup() {
- tft.begin(); //start TFT LCD
- tft.setRotation(3); //set screen rotation
-
- tft.fillScreen(TFT_RED); //fill background
-
- tft.setTextColor(TFT_BLACK); //set text color
- tft.setTextSize(4); //set text size
- tft.drawString("Hello world!",0,0); //draw text string
+ tft.begin();
+ tft.setRotation(3);
+ tft.fillScreen(TFT_BLACK);
+ tft.setTextColor(TFT_GREEN);
+ tft.setTextSize(4);
+ tft.drawString("Hello world!", 20, 100);
}