Add delay to avoid resets
Per discussion in #6, this adds a `delay(0)` call to avoid watchdog timer resets in the ESP8266 when not using the SPI hardware pins.
This commit is contained in:
parent
47c83e929a
commit
521daecd91
1 changed files with 323 additions and 320 deletions
|
|
@ -128,6 +128,9 @@ void testlines(uint16_t color) {
|
||||||
display.drawLine(display.width()-1, 0, 0, y, color);
|
display.drawLine(display.width()-1, 0, 0, y, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// To avoid ESP8266 watchdog timer resets when not using the hardware SPI pins
|
||||||
|
delay(0);
|
||||||
|
|
||||||
display.fillScreen(BLACK);
|
display.fillScreen(BLACK);
|
||||||
for (int16_t x=0; x < display.width()-1; x+=6) {
|
for (int16_t x=0; x < display.width()-1; x+=6) {
|
||||||
display.drawLine(0, display.height()-1, x, 0, color);
|
display.drawLine(0, display.height()-1, x, 0, color);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue