From 89e4d40bbb35b1786d9b7bd0e40aeb0ef50901a6 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Thu, 4 May 2017 02:26:55 +0100 Subject: Move start screen before interrupt init --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index aa1b3b7..bd942f5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,6 +27,10 @@ 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 for (int i = 0; i < 3; ++i) { switch_position[i] = new Counter(switch_pin[i]); @@ -35,9 +39,6 @@ int main(void) //Attach switch sampling timer ISR to the timer instance with the required period timer.attach_us(&tout, SW_PERIOD); - oled.setRotation(2); - oled.printf("%ux%u OLED Display\r\n", oled.width(), oled.height()); - for (;;) { if (update) { update = 0; -- cgit v1.2.3