Jump to content
  • 0

PMOD OLED Driver Multiple Rectangles


CraigA

Question

Hello!

I'm using an Arty-S7 with a PMODOLED.  I want to draw several rectangles on the little display, but the example design seems to delete the previous rectangle when I add a new one.  Is there some magic to display multiple rectangles or do I need to dig deeper and hack on OledGrph.c?

Thanks!

Craig

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Once again, I answered my own question (hey I'm a SW newbie).  There's a command in the driver called OLED_ClearBuffer() that does just what you'd think it does.  It was erasing each shape after I drew it.  Sorry to bug you all.   

Link to comment
Share on other sites

Hi @CraigA,

Presuming you are using the IP core on our Digilent GitHub (link), you can add an additional OLED_DrawRect function that starts from a new position (set by the OLED_MoveTo function); you'll also likely want to not continually call the DemoInitialize function that is in the main.c since that will reset the memory buffer present in the OLED. Otherwise, I would not call the OLED_ClearBuffer function until you are ready to clear the display and not call the OLED_Update function until you have called everything that you want to appear on the screen at that time (unless you want to show one rectangle, then another rectangle next to it, then you would want to call the OLED_Update function inbetween the two OLED_DrawRect functions).

Let me know if you have any questions about this.

Thanks,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...