Skip to content

Commit f3cdbd2

Browse files
committed
microview_fish: Optional brightness cycle example
1 parent 5817707 commit f3cdbd2

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

src/microview_fish/fish.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,24 @@ void setup() {
7373
uView.display();
7474
}
7575

76+
#if 0
77+
static uint8_t contrast = 0;
78+
79+
void loop() {
80+
static int8_t inc = 256 / 16;
81+
if ((inc > 0 && ((uint8_t) (contrast + inc)) <= contrast) ||
82+
(inc < 0 && ((uint8_t) (contrast + inc)) >= contrast)) {
83+
inc = -inc;
84+
}
85+
contrast = contrast + inc;
86+
// uView.clear(PAGE);
87+
uView.contrast(contrast);
88+
// uView.setCursor(0, 0);
89+
// uView.print(String(contrast) + "\n" + String(inc) + "\n");
90+
// uView.display();
91+
delay(1000 / 16);
92+
}
93+
#else
7694
void loop() {
7795
}
96+
#endif
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)