Simulator

A 16x2 LCD simulator with real Arduino code

Mokxi is a free online LCD simulator that runs in your browser, with nothing to install and no account needed. An Arduino Uno reads a thermistor and writes the temperature to a 16x2 character LCD over its I2C backpack, four wires in all. Drag the temperature and the display follows.

  • 505parts on the bench
  • 45boards running now
  • 1.00xreal time, on every board
Arduino Uno: I2C LCD thermometerlive0.000 s 0.00x
Click to open it in the editor
Drag the slider on the thermistor to change the temperature, or click anything else to open it in the editor.

What you can do here

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

  • Watch an HD44780 16x2 LCD draw text from a real sketch
  • Drag the thermistor and see the reading and the low and high change
  • Change the I2C address or the contrast in the properties panel
  • Swap in the six-wire LCD1602 or a 20x4 LCD2004
  • Read the same temperature in the serial monitor
  • Edit the code, press Run, and share the circuit by link

What the running circuit shows

A sensor, a sketch and a display, all in one loop.

A 10 k NTC thermistor and a fixed 10 k make a divider on A0. The sketch turns the reading into degrees with a table and a straight line between entries, because the Uno has no floating point to spare for a logarithm, and writes it to the top line of the LCD. The bottom line keeps the lowest and highest it has seen.

In the engine the thermistor starts at 22.5 °C and the serial monitor prints “temp 22 C” while the LCD shows the tenths. Drag it to 40 °C and the monitor prints “temp 40 C” within a second and a half.

How the LCD is simulated

The controller, not a picture of one.

The display is an HD44780 controller behind a PCF8574 port expander at address 0x27, the backpack most cheap modules have. The sketch’s driver sends each character as six port writes, and the part decodes them the way the real controller does: 4-bit mode, the cursor, the character ROM and the backlight bit. So the classic faults are real here. Forget the backlight and the screen shows nothing, and a sketch that talks to 0x3F when the module answers at 0x27 gets only the row of solid boxes the controller shows before anything sets it up.

The parts bin also has the plain LCD1602 on six pins with the LiquidCrystal library, the 20x4 LCD2004 with and without a backpack, and graphic displays (the SSD1306 and SH1106 OLEDs, the ST7735, ST7789 and ILI9341 TFTs and the Nokia 5110).

How it works

Three steps from a blank tab to a running circuit.

  1. Open the editor

    It runs in your browser tab. Nothing to install, and you need no account to start.

    Your first project
  2. Wire it and write the code

    Drag parts onto a breadboard, run each wire from pin to pin, and write the sketch beside it.

    Wiring
  3. Press Run

    Your sketch compiles in the tab and runs on a model of the chip, with the Serial Monitor beside it.

    Run and serial
Reviews

What makers say about Mokxi.

“The AI checker helps check and correct my circuits, and it has way more components than Tinkercad. As a student I really appreciate the tool.”

ChloeEngineering student

“I’d been looking for a real online electronic simulator that was intuitive and complete when I found Mokxi. I was able to quickly import a Fritzing file and my Arduino sketch and start testing. Mokxi has all of the makings for the best online Arduino simulator I have been able to find!”

JayModel builderFeatured in his DioramaOS post

“I’m using Mokxi to develop and simulate an STM32-based four-wheel-drive robot car before building the actual hardware. It allows me to experiment with DC motor control, PWM, RPM measurement using photointerrupters, and different acceleration, braking, and reversing strategies, helping me understand and refine the system before implementing it in real life.”

NusretRobot car builder, Hamburg

Share your story

FAQ

Questions, answered.

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 work with the LiquidCrystal_I2C library?

The editor compiles sketches written for the common I2C LCD libraries, and the six-wire LCD1602 runs the standard LiquidCrystal library. The circuit on this page uses Mokxi’s own small driver, so you can read every byte it sends.

What address does the LCD use?

0x27 by default, which is what most PCF8574 backpacks answer to. Change the address in the properties panel to 0x3F for the other common backpack.

Can I simulate a 20x4 LCD?

Yes. The LCD2004 and the LCD2004 with an I2C backpack are both in the parts bin.

More simulators

Each one opens on a circuit that is already running.

Put text on an LCD

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