So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By beneventolorenzo
#83879 Hi everyone,
this is my first post here, hopefully I'm doing everything right!

I got an OLED SSD1306 driven i2c display that do not update when it should.

This function works and gets the right parameters:

Code: Select allvoid 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();
}


However after the first time the parameters get displayed they won't change anymore.

This is the full code: https://pastebin.com/MC63vDMh

Thanks in advance,
Lorenzo.