I can't compile the sketch FontTest.ino in arduino IDE v2.3.4

Hi all, how are you?.

I'm trying to compile the sketch FonTest.ino and I'm having several errors.

the first one is

error: invalid conversion from 'const SSD1306wire_display*' to 'uint8_t' {aka 'unsigned char'} [-fpermissive]
   11 |   oled.begin((const SSD1306wire_display*) 0x3C, &SSD1306_128x64);
note:   initializing argument 2 of 'void SSD1306wire::begin(const SSD1306wire_display*, uint8_t)'
void begin(const SSD1306wire_display* display, uint8_t i2c_addr = 0x3C);

on the second argument

The first argument doesn't give any errors because I've made a cast to

(const SSD1306wire_display*)

how can I solve the error?

Thanks in advance for the help.

Please post the full sketch, using code tags when you do

You seem to have the arguments in the wrong order, try

oled.begin(&SSD1306_128x64, 0x3C);

(You can leave 0x3C out, it is the default value.)

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.