-->
Page 1 of 1

SSD1306 OLED display not updating.

PostPosted: Sat Sep 21, 2019 3:29 am
by beneventolorenzo
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.

Re: SSD1306 OLED display not updating.

PostPosted: Sat Sep 28, 2019 12:41 pm
by beneventolorenzo
Nevermind, I looked like a thousand times in my code just to find out I was using SCL PIN (GPIO5) instead of PIN 5 (GPIO 14). Anyway, if you search for this, be sure to double check your pins. Ahahahahahah