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 (844B)
1 /* 2 Ellipse drawing example 3 4 This sketch does not use any fonts. 5 */ 6 7 #include <SPI.h> 8 9 #include <TFT_eSPI.h> // Hardware-specific library 10 11 TFT_eSPI tft = TFT_eSPI(); // Invoke custom library 12 13 14 void setup(void) { 15 tft.init(); 16 17 tft.setRotation(1); 18 19 } 20 21 void loop() { 22 23 tft.fillScreen(TFT_BLACK); 24 25 // Draw some random circles 26 for (int i = 0; i < 40; i++) 27 { 28 int rx = random(60); 29 int ry = random(60); 30 int x = rx + random(480 - rx - rx); 31 int y = ry + random(320 - ry - ry); 32 tft.fillEllipse(x, y, rx, ry, random(0xFFFF)); 33 } 34 35 delay(2000); 36 tft.fillScreen(TFT_BLACK); 37 38 for (int i = 0; i < 40; i++) 39 { 40 int rx = random(60); 41 int ry = random(60); 42 int x = rx + random(480 - rx - rx); 43 int y = ry + random(320 - ry - ry); 44 tft.drawEllipse(x, y, rx, ry, random(0xFFFF)); 45 } 46 47 delay(2000); 48 } 49 50 51