#527 SSD1306 With u8g v2
Testing an SSD1306 128x32 OLED with the new v2 u8g library.
It seems the author has put a lot of work into refactoring and improving what was already one of the best lightweight libraries for driving monochrome displays.
One of the main differences is that Arduino support is provided in two classes that can be chosen to best suit the application:
- U8g2 - includes all graphics procedures, many fonts, but requires buffer memory
- U8x8 - text only, fonts that fit an 8x8 grid, writes direct to device (no buffer memory)
OLED Module Specs
- OLED display, self-illuminating (no backlight), also lower consumption.
- Driver IC: SSD1306
- Size: 0.91 inch
- OLED Resolution: 128 x 32
- I²C interface
|VCC||Power + (DC 3.3 ~5v)|
The module works well on 3.3V or 5V. I have added pull-up resistors on the I²C, but with short jumper wires these don’t seem essential. Combinations I’ve tested that work:
- 5V Arduino, 3.3V power to OLED, with pull-up resistors
- 5V Arduino, 5V power to OLED, with pull-up resistors
- 5V Arduino, 5V power to OLED, no pull-up resistors
Testing a couple of fonts with the U8g2 library API. Flash size: 9482 bytes.
Testing a couple of fonts with the U8x8 library API. Flash size: 6764 bytes.