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

Flickering display #19

Open
KaeroDot opened this issue Feb 24, 2023 · 1 comment
Open

Flickering display #19

KaeroDot opened this issue Feb 24, 2023 · 1 comment

Comments

@KaeroDot
Copy link

I have found the display is flickering, it seems like to slow redraw of the display. It is especially noticeable for lower values of brightness. Maybe I am too sensitive, my wife does not see it, but it is disturbing enough to me.

After some testing (I had to remove MQTT that is not functioning and prevents running the code), it seems to me the coroutines are interfering with the function display.enable_leds() running in the second thread. When I just run display.enable_leds() in second thread, the display is perfectly stable, and stable even if I set 'switched on time' of an actually drawn row for a single microsecond. The display is very dim (as I need it), but not flickering.

However when I start loop.run_forever(), the display starts flickering. So it seems to me the corutines affects the enable_leds() in the second core, but I was not able to find enough micropython documentation how one thread can affect other thread on two core pico processor.

Originally I have started to document the code and learn it to add alarm (and other things needed by myself), but flickering display is a stop for me.

Is there at least some idea how this could be traced and solved? I am not a professional programmer, so my abilities are limited.

@domneedham
Copy link
Owner

Hi there, thanks for taking a look and raising this.

I notice it too, especially on lower brightness though I can live with it. I am (at some point) aiming to improve the scheduling for this, as you said the app is redrawing all the time.

I had hoped the 2nd core would fix it, but it seems not.

I am aiming to come back to this project soon, I have just been super busy recently and never found the right time to sit down and work on it.

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