5

I'm doing this on esp8266 with micro python and there is a way to clear OLED display in Arduino but I don't know how to clear display in micropython i used ssd1306 library to control my OLED

and this is my error I've written a code that prints on OLED from a list loop, but OLED prints it on the text that was printed before it (print one on top of the other not clear and printing) 7enter image description here

display = [ip, request_uri, country, region, city]

for real_time in display:
  oled.text(real_time, 0, 20)
  oled.show()
  time.sleep(2)
  print(real_time)

1 Answers1

8

The fill() method is used to clean the OLED screen:

oled.fill(0)
oled.show()
Sercan
  • 4,739
  • 3
  • 17
  • 36