first commit
This commit is contained in:
commit
e6a42e28e9
4355 changed files with 4626605 additions and 0 deletions
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
Ellipse drawing example
|
||||
|
||||
This sketch does not use any fonts.
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
|
||||
#include <TFT_eSPI.h> // Hardware-specific library
|
||||
|
||||
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
|
||||
|
||||
|
||||
void setup(void) {
|
||||
tft.init();
|
||||
|
||||
tft.setRotation(1);
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
|
||||
// Draw some random circles
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int rx = random(60);
|
||||
int ry = random(60);
|
||||
int x = rx + random(480 - rx - rx);
|
||||
int y = ry + random(320 - ry - ry);
|
||||
tft.fillEllipse(x, y, rx, ry, random(0xFFFF));
|
||||
}
|
||||
|
||||
delay(2000);
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int rx = random(60);
|
||||
int ry = random(60);
|
||||
int x = rx + random(480 - rx - rx);
|
||||
int y = ry + random(320 - ry - ry);
|
||||
tft.drawEllipse(x, y, rx, ry, random(0xFFFF));
|
||||
}
|
||||
|
||||
delay(2000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue