folder structure changed
This commit is contained in:
1 parent
76aba1a93e
commit
6c0b3a277b
2 files changed
-30
No files matched your search
File renamed without changes.
@@ -1,30 +0,0 @@
|
|||||||
#include <Arduino_GFX_Library.h>
|
|
||||||
#include <Adafruit_ST7789.h>
|
|
||||||
#include <Wire.h>
|
|
||||||
|
|
||||||
#define TFT_DC D7
|
|
||||||
#define TFT_RST D9
|
|
||||||
|
|
||||||
Arduino_DataBus *bus = new Arduino_HWSPI(TFT_DC, -1);
|
|
||||||
Arduino_GFX *gfx = new Arduino_ST7789(bus, TFT_RST, 0, true, 240, 240, 0, 0);
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
gfx->begin();
|
|
||||||
|
|
||||||
gfx->fillScreen(ST77XX_GREEN);
|
|
||||||
|
|
||||||
gfx->setTextColor(ST77XX_BLACK);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
// put your main code here, to run repeatedly:
|
|
||||||
drawText(20, 10, 8, "HALLO"); delay(2000);
|
|
||||||
drawText(20, 50, 8, "WORLD"); delay(2000);
|
|
||||||
}
|
|
||||||
|
|
||||||
void drawText(int width, int hight,int size, const char* text) {
|
|
||||||
gfx->setCursor(width, hight);
|
|
||||||
gfx->setTextSize(size);
|
|
||||||
gfx->println(text);
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user