Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display flicker and frame size issue #3

Closed
vjkolaventy opened this issue Jun 18, 2018 · 7 comments
Closed

Display flicker and frame size issue #3

vjkolaventy opened this issue Jun 18, 2018 · 7 comments

Comments

@vjkolaventy
Copy link

Firstly thank you for the nice work and the detailed installation. I have tried it on RPI Zero. The display was flickering. The upper part of the screen has some overlay of date and other data which I am not sure. Please see attached photo and video.

oled

vid.zip

Regards
Vijay

@antiprism
Copy link
Owner

antiprism commented Jun 19, 2018

Hi Vijay

Thanks for reporting the issue.

I am not immediately sure what the problem is, but I wonder if it relates to the transmission of the data not being good enough at the speed the i2c bus is being run, and this leading to screen corruption.

It looks like you are running with the same set-up as me (I have an RPI Zero W with a 4 pin i2c SH1106 OLED) and I was able to run with the bus speed set to 1200000, with the OLED connected by 15cm cables (although I currently use 10cm cables). My OLED screen can be connected to 3.3V or 5V, and I have it connected to 5V.

If you are using 20cm cables, you could try using shorter cables. If you are running the i2c bus faster than 400000, you could try running it at 400000 (dtparam=i2c_arm_baudrate=400000 in /boot/config.txt, and run mpd_oled with '-f 15'). If you are using 3.3V, and your screen supports 5V, try using that.

Adrian.

@vjkolaventy
Copy link
Author

Dear Adrian

I have been trying various settings and recently I have tried using your code with RPI 3. I do not have the issued of flicker with RPI 3 and I get clean display initially. But as the music is played, the frame slowly moves upwards. I am using the following command

mpd_oled -o 3 -a 3c -b 10 -g 1 -f 25

Please see attached video and help me.

video.zip

Regards
Vijay

@vjkolaventy
Copy link
Author

Dear Adrian

Just to update you that your code is working fine with Moode. This problem is only with Volumio.

Regards
Vijay

@antiprism
Copy link
Owner

Hi Vijay

My understanding is that the SSD1306 OLED display you are using has a hardware scrolling function, and this wraps the display. What you are seeing looks like this kind of scrolling, as the mpd_oled program writes to absolute coordinate locations and these have been vertically shifted on the screen and wrapped.

The code I use to access the OLED includes scrolling functions, but I don't call any of them.

You may be seeing the same problem as here,

https://forums.adafruit.com/viewtopic.php?f=47&t=60867

but with the difference that because mpd_oled is not using scrolling the scroll offset is never reset.

The scroll may be an occasional error from running your particular hardware setup too fast (you are using mpd_oled -f 25 and your wires look at least 15cm long). Kernel differences between Volumio and Moode may also be a factor. Do you still see the scroll in Volumio with dtparam=i2c_arm_baudrate=400000 and mpd_oled -f 15?

Anyway, I may be able to clear the issue for you by periodically resetting the scroll. I'll look at this.

Adrian.

@antiprism
Copy link
Owner

Closing. I haven't received any other reports of this issue and so haven't implemented the scroll reset. I will reopen the issue if there are new reports.

@antiprism
Copy link
Owner

@antiprism
Copy link
Owner

Closed with bb55927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants