diff options
| author | Yuval Adam <_@yuv.al> | 2021-12-17 13:46:31 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2021-12-17 13:46:31 +0200 |
| commit | 74b082c851303ff0a87b492c5f3c40759d1fd40c (patch) | |
| tree | 9b7b1ccb39271601c09b9801b11ab3d89bb8d267 | |
| parent | 02ec8cc85eee4b12bf71a7aa1c1a39943e764749 (diff) | |
Green text center screen with Makefile for convenience
| -rw-r--r-- | HelloWorld/HelloWorld.ino | 18 | ||||
| -rw-r--r-- | Makefile | 7 |
2 files changed, 15 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); } diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..75e746f --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +compile: + arduino-cli compile --fqbn Seeeduino:samd:seeed_wio_terminal HelloWorld + +upload: + arduino-cli upload -p /dev/ttyACM0 --fqbn Seeeduino:samd:seeed_wio_terminal HelloWorld + +build: compile upload |
