OLED display, 128x32
The 0.91 inch strip: the same SSD1306, 32 rows tall.
- 4 pins
- 1 setting
- In 1 project
- In 1 lesson
The OLED display, 128x32 in brief
What it is, and every setting the properties panel gives it.
The 0.91 inch OLED strip is 128x32 pixels on the same SSD1306 as the 128x64 module, with the same four pins, GND, VCC, SCL and SDA, on-board pull-ups and address 0x3C. Wire SDA and SCL to A4 and A5 on an Uno or to 21 and 22 on an ESP32, from 3.3 or 5 V. The chip still has eight pages of RAM; the glass is wired to the first 32 rows, so pages 0 to 3 show and pages 4 to 7 are memory nobody sees. Mokxi models the command set in all three addressing modes, contrast, inverse, the 0xA1 and 0xC8 remaps that turn the picture upright, and the charge pump: a driver that never sends 0x8D 0x14 gets a dark strip, as on the bench. The classic mistake is telling the library 128, 64, which puts the bottom half of every drawing in pages the strip does not show. The multiplex ratio and COM pin commands are kept but not acted on, so a 128x64 set-up shows its top half here where real glass would show every other row; reads and burn-in are not modeled.
- Family
- Displays
- Pins
- 4
- address
- 60
- the I2C address,
0x3Cby default.
4 pins
Named as the editor names them, so a wire lands where you expect it.
How to use a 0.91 inch 128x32 OLED with an Arduino
The same four wires as the bigger OLED: SCL to A5, SDA to A4, VCC to 5 V and GND to GND, at address 0x3C. With the Adafruit library, the only change from a 128x64 sketch is the size in the constructor: 128, 32. Tell it 64 and the bottom half of every drawing goes into RAM the strip does not show.
The three small screens project starts the strip by hand, so the set-up is there to read: 0xA8 0x1F for 32 rows, 0xDA 0x02 for the COM pins, 0x8D 0x14 for the charge pump, and 0xAF to turn it on. Leave out the charge pump and the strip stays dark. It writes text into pages 0 to 3, the four the glass shows.
Its frame is 512 bytes, so it fits an Uno more easily than the 128x64. On an ESP32 DevKit wire SDA to GPIO 21 and SCL to 22, from 3.3 V.
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display(128, 32, &Wire, -1);
void setup() {
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0, 8);
display.print("128x32");
display.display();
}
void loop() {}What is true about the OLED display, 128x32, here
In its help article’s own words: what the simulation gets right, and where it stops.
Modeled
Everything the 128x64 part does: the command set in all three addressing modes, the
charge pump that has to be switched on with 0x8D 0x14, the remaps that turn the
picture upright, contrast, inverse. A sketch told it is driving a 128x32 draws in pages
0 to 3 and fills the strip.
Not modeled
The multiplex ratio (0xA8) and the COM pin setting (0xDA) are kept and not acted
on. On the bench, a 128x64 set-up sent to this strip squashes the whole 64-row picture
onto it, every other row. Here it shows the top half of the picture instead. A sketch
that says 128, 32 sends the right set-up and looks the same either way. The rest of
the list on the 128x64 page applies here too.
From SSD1306 128x32 OLED, in full.
See the OLED display, 128x32 in a project
One built-in project uses it. It opens in the editor, already wired.
Where it turns up in a lesson
One lesson places it in its own circuit.
The boards it is shown on
This board has a built-in project with the OLED display, 128x32 in it.
Arduino libraries for the OLED display, 128x32
Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the OLED display, 128x32
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.