move constructor logics into begin() as it needs to be called in the arduino setup()

This commit is contained in:
Adrien Marquès 2020-05-30 19:17:45 +02:00
parent 856934969b
commit 88c6b256ce
Signed by: xdrm-brackets
GPG Key ID: D75243CA236D825E
1 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ void temporary(){
// / address for I2C 128x32 // / address for I2C 128x32
// display.begin(SSD1306_SWITCHCAPVCC, 0x3C) // display.begin(SSD1306_SWITCHCAPVCC, 0x3C)
display.begin();
// display.clearDisplay(); // display.clearDisplay();
@ -56,7 +57,9 @@ void Display::send_commands(const uint8_t *cc, const uint8_t n){
void Display::Display(const resetPin){ void Display::Display(const resetPin){
_rstPin = resetPin; _rstPin = resetPin;
_wire = &Wire; _wire = &Wire;
}
void Display::begin(){
_wire.begin(); _wire.begin();
// reset sequence // reset sequence