You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I found this lib when asking on arduino forum about how to make fast changes in an SSD1306 screen and the buffering works great. Problem is that I cant figure out how to draw, even a rectangle, none of the examples have it..
How could I draw a white rectangle?
Sorry for such a stupid question!
Thanks!
The text was updated successfully, but these errors were encountered:
Unfortunately, since this library is targeting microprocessors with extremely limited RAM, it doesn't write to a RAM buffer, then send that buffer to the SSD1306, instead it writes to the SSD1306's display memory directly. The SSD1306's I2C communication is write-only, you can't read what is in its memory. Writing to its memory sets 8 pixels at once. (The SSD1306 calls 8 rows of pixels a "page".)
For these reasons, pixel/line/rectangle drawing functions are not available.
The "buffering" that this library supports is with the SSD1306 screens that have only 128x32 pixels. As the SSD1306's graphics memory is always 128x64, it can fit two 128x32 screens in its memory, and it can switch which is displayed.
If you have memory to spare available to your microcontroller, you can create your own in-memory buffer to build up with the image you want to display, then copy it to the SSD1306. You will need to get/create line drawing routines of your own.
One of the examples does draw a rectangle (with bevelled/chamfered corners) around the screen. The example program then leaves those parts of the SSD1306's memory untouched, only ever updating within the rectangle:
Hi, I found this lib when asking on arduino forum about how to make fast changes in an SSD1306 screen and the buffering works great. Problem is that I cant figure out how to draw, even a rectangle, none of the examples have it..
How could I draw a white rectangle?
Sorry for such a stupid question!
Thanks!
The text was updated successfully, but these errors were encountered: