Source: https://mokxi.com/learn/arduino-simulator-serial-monitor-logic-analyzer
Updated: 2026-10-05

Learn

# An Arduino simulator with a serial monitor and a logic analyzer

Written by the Mokxi team, updated October 5, 2026

Start building free

Or see every lesson.

- 261 parts on the bench
- 31 boards running now
- 1.00x real time, on every board

Click to open it in the editor

Serial1 sends "ping" lines at 9600 baud. The serial monitor prints them and the logic analyzer on TX1 decodes the same bytes on the wire.

Yes: Mokxi is a free Arduino simulator that runs in your web browser, and it has a two-way serial monitor, a serial plotter, a four-channel logic analyzer that decodes UART, I2C and SPI, an oscilloscope and a debugger that stops the board on a line of your code. There is nothing to install and no account is needed to try it.

The circuit above shows two of them at once. It is an Arduino Mega 2560 sending "ping" lines out of its second serial port. The serial monitor at the bottom of the editor prints what the board says, and a logic analyzer clipped to the TX1 pin draws every bit of the same bytes on the wire and writes the decoded letters over the trace. Press Run and watch both.

The steps below say what each tool is for, how to open it, and what it does not do, so you know before you start whether it answers your question.

## Step 1: print to the serial monitor

The serial monitor is the strip along the bottom of the editor. Anything a board writes with Serial.print() or Serial.println() arrives there as text while the circuit runs. A half-written line shows as it arrives, so a slow loop that prints a character at a time is not held back until the newline.

It talks back, too. Type in the input row at the foot of the monitor and press Enter, and the bytes go to the board, where Serial.read() and Serial.available() see them exactly as they would on a real board over USB. A sketch that waits for a command, a menu over serial, or a Bluetooth module test all work this way.

With two or more boards in one circuit, each line is labeled with the board it came from, and a picker chooses which board the input row talks to. Each board keeps its own decoder, so two boards printing at once never mix bytes inside a line. The monitor keeps the last two thousand lines.

One difference from a real Uno is worth knowing. The monitor is wired to the board’s UART directly, not through pins 0 and 1, so those two pins stay ordinary GPIO here. On a Mega, Serial1 to Serial3 do use their pins, which is why the demo above uses one of them.

A sketch that answers what you type

## Step 2: graph numbers with the serial plotter

The Plot tab sits beside Serial. Print numbers and they become curves: one number on a line is one curve, several numbers separated by spaces, commas or tabs are several curves, and a label:value pair names its curve in the legend. That is the Arduino IDE’s Serial Plotter format on purpose, so a sketch written for the IDE plots here without a line changed.

The window picker shows from one second to five minutes, the legend switches curves on and off, Pause freezes the graph while the board keeps running, and CSV downloads every point. It holds twelve curves of twenty thousand points each. The x axis is simulated time, so two lines printed in the same frame share a timestamp, and nothing is smoothed.

Two named curves for the plotter

## Step 3: watch the wires with the logic analyzer

The logic analyzer is a part on the bench, beside the oscilloscope and the multimeter. Drag it onto the canvas and clip its four probes, D0 to D3, to the pins you want to watch. It records every edge with the exact simulated time it happened, rather than sampling on a timer, so the timing it shows is the simulator’s own and a long quiet stretch costs nothing.

Set its decode setting to UART, I2C or SPI and it labels the bytes over the trace: the letters of a serial line, the address and acknowledge of an I2C transfer, the bytes of an SPI exchange. A probe on nothing is drawn as floating, down the middle of its lane, rather than as a zero. The minus and plus buttons zoom, C clears the capture, and the arrow downloads it as a CSV file with a column per channel.

It is the tool for questions of order and width: did the chip select go low before the first clock, is a DHT22’s one bit really longer than its zero, are the stepper’s four coils switching in the order the sketch thinks. The stepper dial project puts the analyzer on a 28BYJ-48’s four coil lines so you can watch the half-step sequence walk across the screen.

## Step 4: stop the board with the debugger

Click in the gutter to the left of a line number and a red dot appears. Press Run and the board stops before that line runs. You can then read the registers and your own variables, and step through the code one line at a time. While the board is stopped, so is the rest of the circuit: the LED keeps its brightness, the servo keeps its angle and millis() carries on from where it was when you press Continue.

It works on every board Mokxi has. A hollow dot means the compiler made no instruction for that line, such as a comment or a declaration, so move it to the next line that does something.

## What these tools do not do

The logic analyzer has no trigger and no pre-trigger buffer: it records from the start of the run and shows the end of it. A channel is high or low by a half-supply rule, so it cannot show a signal stuck between the two. It has four channels and decodes only UART, I2C and SPI. If you need more channels on one part, or a VCD file for PulseView, Wokwi’s logic analyzer has eight channels and records to VCD.

The serial plotter sees only what the sketch prints. The serial monitor is not a terminal emulator: it decodes UTF-8 text and drops carriage returns. None of this replaces a real bench for noise, ground bounce or a sagging supply, which the simulator does not model.

## Questions

Is there a free Arduino simulator with a serial monitor?

Yes. Mokxi is free and runs in the browser. Its serial monitor shows what the board prints and sends what you type back to the board, and the Plot tab beside it graphs the numbers. Every board and every part, the instruments included, are on the free plan.

Does the serial plotter work with sketches written for the Arduino IDE?

Yes. It reads the Arduino IDE Serial Plotter format: numbers separated by spaces, commas or tabs, and label:value pairs. A switch chooses between plotting every number on a line and plotting only lines that are numbers and pairs and nothing else, which is the IDE’s rule.

How many channels does the logic analyzer have, and what can it decode?

Four channels, D0 to D3. It decodes UART, I2C and SPI, set by its decode property, and exports the whole capture as a CSV file. You can put more than one analyzer in a circuit if you need more probes.

Which boards work with these tools?

The serial monitor, the plotter and the debugger work with every board that has a serial port in Mokxi, from the Uno, Nano and Mega to the ESP32 boards, the Raspberry Pi Pico and the STM32 boards. The logic analyzer and the scope are parts, so they clip onto any circuit, with or without a board.

Related

## Keep going

UART Serial Explained: Baud, Frames and the Wire I2C Explained: Addresses, Pull-Ups and a Scanner SPI Explained: Clock, Data and Chip Select How to Debug Arduino Code: Prints to Breakpoints Measure It: Read a Circuit With a Scope and Plotter Run and the serial monitor, in the help center The serial plotter, in full The logic analyzer, probe by probe The debugger The stepper dial on the logic analyzer Intermediate The weather station, plotted Intermediate The Arduino simulator Mokxi and Wokwi, compared

Sources

## Where the facts on this page come from

- Wokwi docs: logic analyzer (checked October 3, 2026)

## Build this for real

Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.

Start building free Open the editor
