Hi folks, so hoping there is something that I am missing, I have made a program to display humidity and temp on an OLED display, and have a working splash screen (two in fact) but I want to briefly display software version on the display before the splash so I can keep up with things...
However, When I add the following bit of code, I lose the display functionality!
Not sure why, I seem to be ok with memory.... I have tried adding a couple more functions and again the code refuses to work...
Is there something about these displays that make them a bit finicky? Is there something happening when I compile which kills the display?
Happy to leave full code if required, but for now will show the small bit I am working on>>
Working code:
Now the none working code
I cannot for the life of me understand why there would be an issue, especially given memory is 80% program 42% dynamic?
However, When I add the following bit of code, I lose the display functionality!
Not sure why, I seem to be ok with memory.... I have tried adding a couple more functions and again the code refuses to work...
Is there something about these displays that make them a bit finicky? Is there something happening when I compile which kills the display?
Happy to leave full code if required, but for now will show the small bit I am working on>>
Working code:
Working code:
// Initialize display first
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Use 0x3C or 0x3D based on your display
Serial.println("SSD1306 allocation failed");
while(1); // Don't proceed if display fails
}
if (!bme.begin(0x76)) {
displaySensorError();
while(1); // Don't proceed if Sensor fails
}
// Initial display
display.clearDisplay();
delay(200);
display.drawBitmap(0, 0, epd_bitmap_BUN, 128, 64, WHITE);
display.display();
delay(3000);
display.clearDisplay();
delay(100);
display.drawBitmap(0, 0, epd_bitmap_ME3, 128, 64, WHITE);
display.display();
delay(1600);
display.clearDisplay();
Non-working code:
// Initialize display first
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Use 0x3C or 0x3D based on your display
Serial.println("SSD1306 allocation failed");
while(1); // Don't proceed if display fails
}
if (!bme.begin(0x76)) {
displaySensorError();
while(1); // Don't proceed if Sensor fails
}
// Initial display
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0, 0);
display.print("V10153H1");
delay(1500);
display.clearDisplay();
delay(200);
display.drawBitmap(0, 0, epd_bitmap_BUN, 128, 64, WHITE);
display.display();
delay(3000);
display.clearDisplay();
delay(100);
display.drawBitmap(0, 0, epd_bitmap_ME3, 128, 64, WHITE);
display.display();
delay(1600);
display.clearDisplay();
