Kolynskij:
Hi - forgive if this topic was covered, I didn't see it..I have tried the Adafruit library with my Arduino UNO and SSD1306 (128x64 OLED) and it is fast and easy to use. but is RAM hungry. Adding text soon takes me to >95%.
I tried the U8GLIB library (U8G2 refused to draw images properly..) and it was much better, 20% useage with 1 buffer. But, it was very slow in drawing.My question is, can I trim back the buffer size of the Adafruit library, or speed up the drawing of the U8GLIB library to allow me to do other stuff?
Thanks
Kolynskij
After re-reading your question, you haven't provided enough info to provide you an answer. Please answer the following:
- Are you connecting the display via SPI or I2C?
- If I2C, did you set the I2C clock to 400Khz? (it defaults to 100Khz)
- Are you drawing simple 6x8 or 8x8 text (fastest access possible)?
- Are you drawing dots/lines or text that doesn't fit on byte boundaries?
If you just want to draw 6x8 or 8x8 text and don't need a back buffer, the amount of ROM and RAM used by the OLED support code can be quite small and the display can be refreshed quite quickly (even with I2C). If you're drawing dots/lines/odd boundary text then you will need to sacrifice lots of RAM and drawing will be slower.