From 88c6b256cee2ae99546f545c89043b801990f04a Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 30 May 2020 19:17:45 +0200 Subject: [PATCH] move constructor logics into begin() as it needs to be called in the arduino setup() --- twinmax/display.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/twinmax/display.cpp b/twinmax/display.cpp index 985a71c..caef060 100644 --- a/twinmax/display.cpp +++ b/twinmax/display.cpp @@ -18,6 +18,7 @@ void temporary(){ // / address for I2C 128x32 // display.begin(SSD1306_SWITCHCAPVCC, 0x3C) + display.begin(); // display.clearDisplay(); @@ -56,7 +57,9 @@ void Display::send_commands(const uint8_t *cc, const uint8_t n){ void Display::Display(const resetPin){ _rstPin = resetPin; _wire = &Wire; +} +void Display::begin(){ _wire.begin(); // reset sequence