Skip to content

Commit

Permalink
Minor changes in 01-fading.cpp example
Browse files Browse the repository at this point in the history
  • Loading branch information
m1cr0lab committed Sep 12, 2021
1 parent c31a56c commit acb795f
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/01-fading.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* ----------------------------------------------------------------------------
* Control the display backlight LED with dimming effect
* Controls the display backlight with dimming effect
* ----------------------------------------------------------------------------
*/
#include <ESPboy.h>
Expand All @@ -11,19 +11,12 @@ void setup() {

espboy.begin();

LGFX_Sprite fb(&espboy.tft);

fb.createSprite(TFT_WIDTH, TFT_HEIGHT);

fb.drawRect(0, 0, TFT_WIDTH, TFT_HEIGHT, TFT_GREEN);
fb.setTextColor(TFT_WHITE);
fb.drawCenterString(F("TFT Backlight"), 64, 40);
fb.setTextColor(TFT_LIGHTGRAY);
fb.drawString(F("ESC: fade out"), 26, 64);
fb.drawString(F("ACT: fade in"), 26, 80);
fb.pushSprite(0, 0);

fb.deleteSprite();
espboy.tft.drawRect(0, 0, TFT_WIDTH, TFT_HEIGHT, TFT_GREEN);
espboy.tft.setTextColor(TFT_WHITE);
espboy.tft.drawCenterString(F("TFT Backlight"), 64, 40);
espboy.tft.setTextColor(TFT_LIGHTGRAY);
espboy.tft.drawString(F("ESC: fade out"), 26, 64);
espboy.tft.drawString(F("ACT: fade in"), 26, 80);

}

Expand Down

0 comments on commit acb795f

Please sign in to comment.