Go Down

Topic: u8glib sdd1306 oled slow (Read 226 times) previous topic - next topic


Here we are.

Just tested the sdd1306 display with the adafruit library

from 0 to 100 it takes 4,3 seconds, half of the u8glib (well, the font is uglier)

I'll switch to SPI.

Code following below.

Code: [Select]

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 0
Adafruit_SSD1306 display(OLED_RESET);

void setup()   {                

  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)
  // init done
  // Show image buffer on the display hardware.
  // Since the buffer is intialized with an Adafruit splashscreen
  // internally, this will display the splashscreen.

  // Clear the buffer.

void loop() {
  int x;
  char buf[5];
  unsigned int initial = 0;
  unsigned int final = 0;
  initial = millis();
  for (x=0; x<=100; x++) {
    display.print(itoa(x, buf, 10));
  final = millis();

Go Up