Shop OBEX P1 Docs P2 Docs Learn Events
uOLED-128-G1 Flicker — Parallax Forums

uOLED-128-G1 Flicker

computer guycomputer guy Posts: 1,113
edited 2012-08-03 00:55 in General Discussion
I am displaying various icons on the uOLED display (these are drawn using lines, rectangles, etc).
The problem is, in order to hide and show the appropriate icons (to indicate device status) I am erasing the screen every 1 seconds and then re-drawing everything.
However this causes the display to flicker (only slightly, but enough that it looks unprofessional).

Would be nice if there was a way to lock the display, do the drawing routines and then unlock it. So it all gets drawn at once.

Does anyone have any thoughts or recommendations on how I might remove or reduce the flickering? I had thought of re-drawing 25 times per seconds, but haven't tried this yet.


Thanks :)

P.S I am using the uOLED-128-GM1 driver from obex.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-08-02 19:55
    I don't think there's an easy solution to this.

    In my experience, to way to minimize flicker like you discribe is to only redraw the area of the screen you want to change. You could erase the old icon by drawing the same shape with the background color or draw a box over the area where the icon was with the background color.
  • computer guycomputer guy Posts: 1,113
    edited 2012-08-02 20:19
    Thanks Duane.

    Looks like that's what I'm going to have to do.
  • TubularTubular Posts: 4,740
    edited 2012-08-02 21:00
    You can also run the fast part of the update on the module itself using 4dgl.
  • WBA ConsultingWBA Consulting Posts: 2,938
    edited 2012-08-03 00:55
    Ditto for Duane's response. I have the same issue with the display on my handheld GPS. I figured doing a redraw in black would save the flicker and overall "refresh rate" of the display since I am also to a flat "erase" at the end of my loop before I start again. The flicker is extremely annoying. I haven't changed my code yet for the "redraw in black" but once I finish cleaning up my great circle math code, that will be one of the next items.
Sign In or Register to comment.