From dbd3428936db3298550fcd65b736a14ab032a3ad Mon Sep 17 00:00:00 2001 From: Waleed El-Geresy Date: Thu, 4 May 2017 10:01:52 +0100 Subject: Add clear display to init --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 6b84325..33bb55c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,7 +28,6 @@ Adafruit_SSD1306_Spi oled(gSpi, D_DC_PIN, D_RST_PIN, D_CS_PIN, 64, 128); int main(void) { oled.setRotation(2); - oled.printf("%ux%u Group Ay08-04\r\n", oled.width(), oled.height()); wait(0.5); // Enable ISR for the switch rising edge @@ -39,6 +38,9 @@ int main(void) //Attach switch sampling timer ISR to the timer instance with the required period timer.attach_us(&tout, SW_PERIOD); + oled.clearDisplay(); + oled.printf("%ux%u Group Ay08-04\r\n", oled.width(), oled.height()); + for (;;) { if (update) { update = 0; -- cgit v1.2.3