From 74b082c851303ff0a87b492c5f3c40759d1fd40c Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 17 Dec 2021 13:46:31 +0200 Subject: Green text center screen with Makefile for convenience --- HelloWorld/HelloWorld.ino | 18 ++++++++---------- Makefile | 7 +++++++ 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 Makefile 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 -- cgit v1.3.1