SSD1306 OLED display not updating.
Posted: Fri Sep 20, 2019 7:20 am
Hi everyone,
my first post here, hopefully I'm using the right section!
I'm having troubles updating an OLED Display (SSD1306, 128x32).
This function is being called every five seconds and it should update the display with the current values.
It does show the text at first but then it keeps the old one displayed.
This is the full script: https://pastebin.com/MC63vDMh
Thanks in advance,
Lorenzo.
my first post here, hopefully I'm using the right section!
I'm having troubles updating an OLED Display (SSD1306, 128x32).
This function is being called every five seconds and it should update the display with the current values.
Code: Select all
void setDisplayText(String topText, String tempText, String stateText){
Serial.println("IP: "+topText + "\tTemp: "+tempText + "\tState: "+stateText);
display.clearDisplay();
display.fillRect(0, 0, 128, 32, BLACK);
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.println(topText);
display.setCursor(96, 0);
display.println(stateText);
display.setTextSize(2);
display.setCursor(32, 16);
display.println(tempText);
display.display();
}
It does show the text at first but then it keeps the old one displayed.
This is the full script: https://pastebin.com/MC63vDMh
Thanks in advance,
Lorenzo.