Simulator

An SSD1306 OLED simulator, pixel for pixel

Mokxi is a free online OLED display simulator that runs in your browser, with nothing to install and no account needed. An Arduino Uno draws titles, shapes, a bouncing ball and a counter on a 128x64 SSD1306 OLED over I2C. Every pixel on the screen is one the sketch actually sent.

  • 455parts on the bench
  • 43boards running now
  • 1.00xreal time, on every board
Arduino Uno: SSD1306 OLEDlive0.000 s 0.00x
Click to open it in the editor
The ball bounces and the counter ticks. Click the circuit to open it in the editor.

What you can do here

In the circuit above, or in the editor it opens.

  • Watch a 128x64 SSD1306 draw text, lines, rectangles and circles
  • Change the drawing code and see it on the screen in a second
  • Set the I2C address to 0x3C or 0x3D, or get it wrong on purpose
  • Try the 128x32 SSD1306, the SH1106 or the SH1107
  • Move the same display to an ESP32 or an ESP32-C3
  • Save the project and share it with one link

What the running circuit shows

A whole frame buffer on a board with 2 KB of RAM.

The OLED’s SCL and SDA go to A5 and A4, with VCC on 5 V. The sketch keeps the 1024-byte frame in RAM, because the panel cannot be read back, draws the furniture once, then moves only the ball, the counter and a bar, and sends just the eight-column blocks that changed. In the engine the screen has 1067 pixels lit a second and a half after Run.

Change the display’s address in the properties panel and the sketch prints “no OLED answered 0x3C; check SCL, SDA and power” in the serial monitor, which is the first thing to check when a real one stays dark.

How the OLED is simulated

The SSD1306 command set, decoded.

The part speaks the SSD1306’s I2C protocol: the address byte, the control byte, the addressing modes, contrast, display on and off, inversion and the page and column windows. A library that sends the right commands draws the right picture, and one that sends the wrong ones draws garbage, as on a real module. The Uno’s sketch bit-bangs I2C on two pins, so any two pins would do.

What it leaves out: there is no burn-in, no ghosting and no current draw from the panel, so nothing here tells you a real module’s brightness or how long it lasts.

Questions

Is it free?

Yes. The circuit on this page, every part in it and the editor it opens in are on the free plan, with no card.

Do I need an account?

No. The circuit runs the moment the page does, and the editor opens without one. A free account is only for saving a project to the cloud and sharing it by link.

Does it run Adafruit_SSD1306 sketches?

The editor compiles sketches for the common SSD1306 libraries for the boards that support them. The circuit on this page uses Mokxi’s small driver so the whole program fits on an Uno with room to spare.

Can I simulate a 128x32 OLED?

Yes. The 128x32 SSD1306 is a separate part in the bin, next to the SH1106 and SH1107.

Can I use the OLED with an ESP32?

Yes. Built-in projects run it on an ESP32 and an ESP32-C3, and any board with two free pins can drive it.

Draw on an OLED

Open the circuit, change a shape and press Run. Nothing to install, and no account needed.