Closed rfrht closed 2 months ago
My setup was using the GPIO port 2. After further investigation, I found in this picture that GPIO lines 2 and 3 are bridged to the ports SCL
and SDA
in the Arduino Leonardo. Essentially, it was conflicting and hampering the I2C operations.
By moving my GPIO ports (and fixing the code) to somewhere else fixed the issue and the display now works nicely.
(writing for documentation sake, hoping this helps other users)
Arduino board:
Arduino Leonardo
Arduino IDE version (found in Arduino -> About Arduino menu):
Every SSD1306 library
List the steps to reproduce the problem below:
I have a working code with Arduino Uno,
The very same code doesn't work with Arduino Leonardo.
The display stays blank
Evaluating the code, it never gets past the display initialization
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
instructionIt also doesn't throw the error on
Serial.println(F("SSD1306 allocation failed"));