Run ChatGPT Arduino code online: paste the answer, press Run
To run ChatGPT Arduino code online, copy its answer and paste it here.
Drop it here, or paste it
Mokxi pulls the sketch out of the answer, chooses a board, wires what the sketch uses and opens the editor, where Run compiles it in your browser. Mokxi is an independent simulator: it is not made by OpenAI and has no tie to it.
A traffic light, the sort of first project people ask a chat for: three pins called redLed, yellowLed and greenLed. It opens on an Uno with an LED and a resistor on pins 10, 9 and 8, ready for Run.
Paste from ChatGPT or ClaudeCopy a prompt, say what to build, paste the answer.
- 1Copy the promptIt teaches your AI how to write a Mokxi project.
- 2Say what to buildPaste the prompt into ChatGPT, Claude, Gemini or Cursor and add what you want, like "a night light with a light sensor".
- 3Paste its answer hereThe whole reply is fine. It opens wired and ready to run.
Only have a photo or a screenshot of the circuit? Give your AI the picture with this prompt instead.
Your AI app supports MCP? Add the Mokxi server and it builds the link for you. How
From Tinkercad? Three stepsBring a circuit across wired, with its code.
- 1Export the circuitIn Tinkercad, open the circuit, press Export and download the .brd file. It has every part and wire.
- 2Download the codeOpen Code, switch to Text and press the download button for the .ino.
- 3Drop both hereChoose or drop the .brd and the .ino together: it opens wired, with the code on the board. No .brd? Paste the Component List with the code under it.
What Mokxi reads from ChatGPT
An answer copied with the Copy button under the message, Markdown and all.
A single code block, copied with the Copy code button in its corner.
An answer with several blocks. When one is a diagram.json and another is the sketch they become a single project; otherwise the longest block that reads as a sketch is the one used.
A link ChatGPT wrote that begins mokxi.com/app/#code= or mokxi.com/app/#ai=, which you click instead of pasting.
What comes across
The sketch, without the chat around it
The greeting, the explanation and the offer of more help at the end are dropped. What lands in the editor is the code as ChatGPT wrote it, with the fence lines removed.
Parts on the pins the code uses
If the code says myServo.attach(9), there is a servo on pin 9. If it calls digitalWrite(ledPin, HIGH) with ledPin set to 13, an LED and its 220 ohm resistor are on 13. A buzzer, a relay or a PIR is chosen when the name of the pin says so.
A real build
An answer in a chat arrives uncompiled. Mokxi builds it in the tab with the common Arduino libraries, so "this should work" turns into a running circuit or into an error with a line number.
What does not, and what happens instead
Pictures of a circuit
A breadboard image generated in the chat is not read, and a drawn breadboard is easy to get wrong. Paste the code and let the wiring follow from it.
The conversation
Mokxi never sees your chat. Only the text you paste on this page is read, in your browser, and no project is stored until you save one yourself.
Modules Mokxi cannot place for certain
When the sketch drives a module the importer is unsure of, the board and the rest of the circuit still open, and that one part is left for you to add from the parts list.
From ChatGPT to Mokxi
Step 1
Ask ChatGPT for the complete sketch in one code block, and to say which board it is for.
Step 2
Press Copy under its answer.
Step 3
Click in the box on this page and paste. There is no button to press: the editor opens on its own.
Step 4
Press Run, watch the circuit and read the serial monitor. Take any error back to the chat word for word.
Questions about importing from ChatGPT
How do I test Arduino code from ChatGPT without a board?
Copy the answer, paste it into the box on this page and press Run in the editor that opens. The sketch is compiled in your browser and runs on a simulated Arduino with its parts wired.
Can I ask ChatGPT to give me a Mokxi link?
Yes. Ask for "a link of the form https://mokxi.com/app/#code= followed by the sketch URL-encoded, ending in &board=uno". Clicking it opens the editor with the code wired. A long sketch makes a long link and a chat app may cut it short, while pasting the code always works.
Can ChatGPT build the whole circuit, not only the code?
Yes, in two ways the AI docs describe. Connect Mokxi’s MCP server in ChatGPT’s developer mode and it looks up parts and pins itself. Or copy the prompt from Paste from ChatGPT or Claude under the box, so that it answers with a project Mokxi wires exactly as written.
Is this an official ChatGPT feature?
No. Mokxi is a separate product. It reads text that you paste and has no connection to your ChatGPT account.
Why does code from ChatGPT sometimes fail to compile?
It was written without being built. A library function that does not exist, a pin from a different board or an answer that stops before its closing brace are the usual causes, and the compiler’s message points at each.
