adafruit / Adafruit_Seesaw

Arduino library driver for seesaw multi-use chip
93 stars 64 forks source link

error: invalid cast to abstract class type 'Adafruit_SH110X' #53

Closed githubguy007 closed 3 years ago

githubguy007 commented 3 years ago

I receive an error, when compiling with...

#define USE_OLED true

The error message is...

Arduino: 1.8.16 (Mac OS X), Board: "Adafruit Feather M4 Express (SAMD51), Enabled, 120 MHz (standard), Small (-Os) (standard), 50 MHz (standard), Arduino, Off"

multiple_encoders:16:59: error: invalid cast to abstract class type 'Adafruit_SH110X' 16 | Adafruit_SH110X display = Adafruit_SH110X(64, 128, &Wire);

Replacing...

Adafruit_SH110X display = Adafruit_SH110X(64, 128, &Wire);

With....

Adafruit_SH1107 display = Adafruit_SH1107(64, 128, &Wire);

Compiles successfully.

ladyada commented 3 years ago

ok thanks, can you submit a PR please ? :)

githubguy007 commented 3 years ago

My first PR, hopefully I did it properly.

ladyada commented 3 years ago

looks good! congrats :)