ssd1306 oled: scroll repeats edge pixels

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
jarekd
Posts: 13
Joined: Mon Aug 21, 2017 3:54 pm

ssd1306 oled: scroll repeats edge pixels

Post by jarekd » Sun Jul 22, 2018 7:23 pm

Hey. When I scroll screen using scroll(x,y), if there were any pixels touching the edge of the screen it repeats them over and over. Is there any way to avoid this?

mfitzp
Posts: 2
Joined: Mon Jul 17, 2017 1:56 pm

Re: ssd1306 oled: scroll repeats edge pixels

Post by mfitzp » Mon Sep 03, 2018 11:35 pm

Did you find a solution to this? I saw something similar when playing around with a scrolling heart-beat display, but can't remember how I solved it. I think in the end I may have been drawing over the end of the screen buffer when attempting to draw the pixels to 'scroll in', or maybe I just started drawing at 1px in from the edge.

If you draw on the left and scroll left does it appear on the right?

User avatar
pythoncoder
Posts: 4347
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: ssd1306 oled: scroll repeats edge pixels

Post by pythoncoder » Tue Sep 04, 2018 12:04 pm

I don't know if this is relevant but the framebuf scroll method does not erase pixels revealed by scrolling. So, for example, if you scroll down by 3 rows the top 3 rows will still contain the original pixels. This is by design.
Peter Hinch

User avatar
mcauser
Posts: 453
Joined: Mon Jun 15, 2015 8:03 am

Re: ssd1306 oled: scroll repeats edge pixels

Post by mcauser » Tue Sep 04, 2018 9:43 pm

The frame buffer scroll is like a copy-n-paste, resulting in artefacts like you described. Try scrolling 5px or 10px and it should make the effect more obvious.

The hardware scroll methods shifts the pointer to the display memory, resulting in pixel wrap around. You don’t have to scroll the entire display either. You can select a window. Have a look at the SSD1306 datasheet. There’s a bunch of commands you can call, unsupported by the native driver, which let you push pixels around.

jarekd
Posts: 13
Joined: Mon Aug 21, 2017 3:54 pm

Re: ssd1306 oled: scroll repeats edge pixels

Post by jarekd » Thu Sep 20, 2018 3:59 pm

The only solution to fix this, is just scrolling and then drawing empty rectangle in place, where garbage shows up.

User avatar
pythoncoder
Posts: 4347
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: ssd1306 oled: scroll repeats edge pixels

Post by pythoncoder » Sat Sep 22, 2018 5:15 am

Yes.

Take a look at the code. The way the framebuf scroll method works was a deliberate design decision. Personally I think an option to clear the revealed area would be a good idea. But the docs are quite clear about this effect.
Peter Hinch

BigStupidBeast
Posts: 9
Joined: Thu May 28, 2020 5:40 pm
Location: sorry for my English)

Re: ssd1306 oled: scroll repeats edge pixels

Post by BigStupidBeast » Tue Jun 16, 2020 8:50 pm

the problem is still not resolved

Post Reply