Adafruit_SSD1306 how to change pin SCL SDA

Hello!

Is there any way i can change the libaries default pins and put them like on A0 and A1 or something else?
I got a ATmega promicro and as i can see on the pinout, there are no A4&A5... But for the 0.96 OLED to work, i should use a libary which has fixed pins... So i had a look on google and after that in the Libary itself, but could not find how....

#if defined (__AVR__) || defined(TEENSYDUINO) || defined (ESP8266) || defined (ESP32)
        int8_t  _cs, _dc, _rst, _sclk, _mosi, _miso;
#else 
        int32_t  _cs,            ///< Arduino pin # for chip-select pin 
	  _dc,                   ///< Arduino pin # for data-command pin 
	  _rst,                  ///< Arduino pin # for reset pin 
	  _sclk,                 ///< Arduino pin # for SPI clock pin 
	  _mosi,                 ///< Arduino pin # for SPI MOSI pin 
	  _miso;                 ///< Arduino pin # for SPI MISO pin

But i have no clue with indeep programming tho :slight_smile:
Maybe it references to a other Libary where the Pins are handled by syntax i don't know about yet.

Thanks for any ideas and hints

yeti86:
Is there any way i can change the libaries default pins and put them like on A0 and A1 or something else?

I'd say no. The hardware I2C functionality is locked in to specific pins. It's possible that the library has a software I2C option but that would have inferior performance and overhead compared to using hardware I2C.

yeti86:
I got a ATmega promicro and as i can see on the pinout, there are no A4&A5

On the Pro Micro, the I2C pins are not A4 and A5 like on some of the other Arduino boards. Instead, they are:
SDA: 2
SCL: 3

You can infer that information from the Wire library reference:

Although it doesn't mention the Pro Micro, it does document the pins for the Leonardo and the Pro Micro has the same pin mapping as the Leonardo (same ATmega32U4 microcontroller as well), only in a different form factor:

Leonardo 2 (SDA), 3 (SCL)

Oh my, i was so obsessed with the A4&5 PIN that i did not see that... :o

Thanks