SSD1306 - U8g2lib Framerate?

I was intrigued by the theoretical FPS (Frames Per Second) that can be achieved with a 128x64 SSD1306.

Normally you would display an XBM bitmap or an Adafruit bitmap.
An animation simply consists of displaying each frame in sequence.

I have attached a sketch that animates 15 frames on a SSD1306.
The time for 15 frames is printed on the Serial Terminal. 15 frames at 30 FPS would take 500 ms.

Since your "animation" is in Flash, you might just as well pre-process it into the actual format used in the library screen buffer.

The result is dramatic. I can achieve 240 FPS on a Uno using SPI !! (280 FPS with Adafruit_SSD1306)

Note that the sketch uses current versions of U8g2lib and Adafruit_SSD1306.
You can change bus speeds with u8g2.setBusClock()
Or with the new full-fat constructors from Adafruit_SSD1306

David.

p.s. does anyone have any nice monochrome animations suitable for 128x64?
A Uno can store up to 20 full frames in Flash memory.
Monochrome Line animations can work with bigger TFT screens e.g. 240x240
I can resize a GIF, JPG, ... on a PC. And convert to the RAW buffer format.

OLED_fps.zip (20.7 KB)