NerdNos-Firmware/Lib/TFT_eSPI/examples/160 x 128/TFT_Ellipse/TFT_Ellipse.ino
BitMaker-hub 3a09daeab2 Move to PlatformIO
- [x]  Move project to platformIO
- [x]  Bug rectangle on screen when 1milion shares
- [x]  Bug memory leaks
- [x]  Bug Reboots when received JSON contains some null values
- Readme update with build troubleshooting
TODO
- [ ]  Improve hashrate using Blockstream Jade miner code
- [ ]  Add blockHeight to screen
- [ ]  Add new screen with global mining stats
- [ ]  Add support to control BM1397
2023-04-15 23:56:13 +02:00

51 lines
889 B
C++

/*
Ellipse drawing example
This sketch does not use any fonts.
*/
#include <TFT_eSPI.h> // Hardware-specific library
#include <SPI.h>
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 filled elipses
for (int i = 0; i < 20; i++)
{
int rx = random(40);
int ry = random(40);
int x = rx + random(160 - rx - rx);
int y = ry + random(128 - ry - ry);
tft.fillEllipse(x, y, rx, ry, random(0xFFFF));
}
delay(2000);
tft.fillScreen(TFT_BLACK);
// Draw some random outline elipses
for (int i = 0; i < 20; i++)
{
int rx = random(40);
int ry = random(40);
int x = rx + random(160 - rx - rx);
int y = ry + random(128 - ry - ry);
tft.drawEllipse(x, y, rx, ry, random(0xFFFF));
}
delay(2000);
}