#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
If the array (creds) contains 2 elements, display.begin(SSD1306_SWITCHCAPVCC, 0x3C) returns true, however some pixels randomly light up. If the array contains 3 elements display.begin(SSD1306_SWITCHCAPVCC, 0x3C) return false. Sofar I tested different string lengths and optimization levels but nothing helps. Does somebody know the reason for this?
Mampfi:
Without the String class the problems disappear.
As one would expect.
Regrettably, we are unable to make necessary corrections to the Arduino "reference" pages which proceeds to detail a String class but is missing the critical highlighted warning at the top of the page advising not to use that class in programs/ "sketches".