Adafruit code issue

Hello all

Can anyone point me in the right direction as to what the problem is here...

https://learn.adafruit.com/pages/7293/elements/2290051/download

The demo code on this page throws up the error for this line:

Adafruit_SSD1306 display = Adafruit_SSD1306(128, 32, &Wire);

invalid conversion from 'TwoWire*' to 'int8_t {aka signed char}' [-fpermissive]

All libraries etc seem to be correct, and compiles if you comment out this line.

Any ideas on a fix?

All libraries etc seem to be correct, and compiles if you comment out this line.

No, it seems that you have an old version of the Adafruit_SSD1306 library intalled.

Turn on verbose compile messages and search in the output you get where that library is taken from. I guess you have the library installed twice and the IDE chooses the old one.

Hmm.. that doesn't appear to be the problem.
Cannot see any duplicate libraries.

Adafruit have come back to me and said there has been a recent update to the library and they will get back to me.

Check the include file that is listed in the compiler messages. Does that include that line:

  Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi=&Wire, int8_t rst_pin=-1,
uint32_t clkDuring=400000UL, uint32_t clkAfter=100000UL);

If not, it probably has this line:

Adafruit_SSD1306(int8_t DC, int8_t RST, int8_t CS);

which is from an old version of that library.

If you have the first line you either did not use the file the compiler told you or your IDE is broken.

Its the second line -

Adafruit_SSD1306(int8_t DC, int8_t RST, int8_t CS);

No duplicate library, and if I delete the library.... it says it's missing (obviously).

Any idea of the fix? I am stumped I can't find a second library.

Remove existing library, download above. Add downloaded zip using library manager should do.

Rolled back to an earlier version of the only library I had installed and that seems to have fixed it.

Thanks all