summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWaleed El-Geresy <waleed.el-geresy15@imperial.ac.uk>2017-05-04 10:01:52 +0100
committerVasil Zlatanov <v@skozl.com>2017-05-04 10:13:00 +0100
commitdbd3428936db3298550fcd65b736a14ab032a3ad (patch)
treeda599e060ab08847e943e57676c2edd6b893b615 /src
parentd4067e7321b320b660efe1ae99bceddae76db959 (diff)
downloade2-switch-dbd3428936db3298550fcd65b736a14ab032a3ad.tar.gz
e2-switch-dbd3428936db3298550fcd65b736a14ab032a3ad.tar.bz2
e2-switch-dbd3428936db3298550fcd65b736a14ab032a3ad.zip
Add clear display to init
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
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;