| 17 | SimpleTimer timer; |
| 18 | |
| 19 | void demo() |
| 20 | { |
| 21 | Serial.println(_F("Display start")); |
| 22 | tft.begin(); |
| 23 | tft.setRotation(2); // try yourself |
| 24 | tft.fillScreen(); |
| 25 | tft.fillRect(10, 20, 100, 120, YELLOW); |
| 26 | |
| 27 | timer.initializeMs<1000>([]() { |
| 28 | // text display tests |
| 29 | tft.fillScreen(); |
| 30 | tft.setTextSize(1); |
| 31 | tft.setTextColor(GREEN); |
| 32 | tft.setCursor(0, 0); |
| 33 | tft.println(_F("Sming Framework")); |
| 34 | tft.setTextColor(BLACK, WHITE); // 'inverted' text |
| 35 | tft.setCursor(104, 7); |
| 36 | tft.println("v1.0"); |
| 37 | tft.setTextColor(WHITE); |
| 38 | tft.println(_F("Let's do smart things")); |
| 39 | tft.setTextSize(3); |
| 40 | tft.setTextColor(BLUE); |
| 41 | tft.print("IoT"); |
| 42 | }); |
| 43 | timer.startOnce(); |
| 44 | } |
| 45 | |
| 46 | } // namespace |
| 47 |
no test coverage detected