acidportal- 😈 Worlds smallest Evil Portal on a LilyGo T-QT |
git clone git://git.acid.vegas/acidportal.git |
Log | Files | Refs | Archive | README | LICENSE |
TFT_Ellipse.ino (843B)
1 /* 2 Ellipse drawing example 3 4 This sketch does not use any fonts. 5 */ 6 7 #include <TFT_eSPI.h> // Hardware-specific library 8 #include <SPI.h> 9 10 TFT_eSPI tft = TFT_eSPI(); // Invoke custom library 11 12 void setup(void) { 13 tft.init(); 14 15 tft.setRotation(1); 16 17 } 18 19 void loop() { 20 21 tft.fillScreen(TFT_BLACK); 22 23 // Draw some random ellipses 24 for (int i = 0; i < 40; i++) 25 { 26 int rx = random(60); 27 int ry = random(60); 28 int x = rx + random(320 - rx - rx); 29 int y = ry + random(240 - ry - ry); 30 tft.fillEllipse(x, y, rx, ry, random(0xFFFF)); 31 } 32 33 delay(2000); 34 tft.fillScreen(TFT_BLACK); 35 36 for (int i = 0; i < 40; i++) 37 { 38 int rx = random(60); 39 int ry = random(60); 40 int x = rx + random(320 - rx - rx); 41 int y = ry + random(240 - ry - ry); 42 tft.drawEllipse(x, y, rx, ry, random(0xFFFF)); 43 } 44 45 delay(2000); 46 } 47 48 49