Embeds

Run Arduino and ESP32 sims in your tutorial

Paste one line and your readers get the circuit running in your post, with your own code: they press Run, read the sketch, and open a copy of their own. Free, and nobody needs an account to watch it run.

How to embed a circuit

Three steps, about a minute.

  1. Build it, or open one. Wire the circuit and write the sketch in the editor, then save it to your free account. Any of the built-in projects works too.
  2. Press Share, then Embed. Pick the size, the theme, whether the code shows and whether it starts on its own. The preview beside the options is the embed itself. Saving builds your sketch, so the embed runs your code, not a stand-in.
  3. Copy and paste. The iframe code goes in an HTML block; the Markdown goes in a README; the plain link goes anywhere that embeds by link.

A live example

This is an embed, running on this page exactly as it would on yours. Press Run, switch to Code, open it in the editor.

The code for the embed above
<iframe src="https://mokxi.com/embed/example/traffic-light?view=split" width="100%" height="440" style="border:0;max-width:100%;border-radius:8px" loading="lazy" title="Traffic light, running in Mokxi"></iframe>

Any built-in project can be embedded the same way, no account needed: /embed/example/<name>, with the name from the end of its page’s address on the projects page.

The options

Add them to the embed’s address. The share sheet writes them for you; anything left out keeps its default.

OptionValuesWhat it does
themelight, dark, autoThe colors. auto (the default) follows the reader’s system.
autorun1, 01 (the default) starts the circuit once it scrolls into view. 0 waits for Run, and downloads nothing until then.
viewcircuit, code, splitWhat shows first. split puts the circuit and the code side by side, stacked on a phone.
height200 to 1200The height in pixels, for hosts that size the frame from the page.
hideCode1Takes the code out, the Code tab with it: the circuit alone.
starta file nameThe file the code opens on, such as notes.h.
edit0Hides the Edit in Mokxi link, which otherwise opens a copy of the circuit in the editor.
An address with options
https://mokxi.com/embed/<project id>?theme=dark&view=split&autorun=0&height=480

Where it works

Anywhere that takes an iframe, and a few places that take only a link.

WhereWhat to paste
WordPressThe iframe code, in a Custom HTML block.
GitHub Pages, Jekyll, Hugo, Astro, any static siteThe iframe code, straight into the page or the Markdown file.
Medium, Ghost, DiscourseThe project’s link (mokxi.com/p/...): it turns into the running circuit through oEmbed where the platform reads it.
Notion and other link embedsThe plain link.
A GitHub READMEThe Markdown: GitHub shows no frames, so it is the circuit’s picture, linking to the page where it runs.
Iframe
<iframe src="https://mokxi.com/embed/%3Cproject%20id%3E?height=400" width="600" height="400" style="border:0;max-width:100%;border-radius:8px" loading="lazy" title="My circuit, running in Mokxi"></iframe>
Markdown
[![My circuit, a circuit you can run in Mokxi](https://mokxi.com/og/p/%3Cproject%20id%3E.png)](https://mokxi.com/p/%3Cproject%20id%3E)
Plain link
https://mokxi.com/embed/%3Cproject%20id%3E

Free, with a small badge

Embedding is free on every plan, with no limit on embeds or readers.

An embed from a free account carries a small “Made with Mokxi” link in the corner. A paid plan removes it. The embed sets no cookies and carries no advertising tags. See the plans.

Want the circuit to run in CI or from your own tools instead? That is the API and the CLI.