An Arduino simulator that runs on a Chromebook
- 192parts on the bench
- 25boards running now
- 1.00xreal time, on every board
Yes, you can run Arduino code on a Chromebook: Mokxi is a free Arduino simulator that runs in Chrome, with nothing to install and no account needed. Most US classrooms run on Chromebooks, and the Arduino IDE is a desktop program that does not install on a managed Chromebook. That leaves a lot of students and teachers searching for a way to write Arduino code on the machine they actually have. The circuit above is the answer this page is about: an Arduino Uno with an LED on pin 13, blinking, running in this Chrome tab right now.
Mokxi is a web page. The simulation and the compiler both run on the Chromebook itself, inside Chrome, so there is nothing to install, no extension to approve and no admin rights needed. A student can open the editor and press Run without an account. This page explains what that gets you, where it stops, and how to get from here to a real board when you have one.
What works on a Chromebook
Everything in the editor. You drag parts onto a real breadboard, wire them, write C++ in the code pane, and press Run. Your sketch is compiled by a real clang compiler, built for the browser and running in the tab, and the firmware runs on a model of the chip: an ATmega328P for the Uno, or the real processor core for the other boards. Timers, interrupts, PWM, analogRead and the serial monitor behave the way the chip does.
The first build in a fresh browser downloads the compiler once, about seventy megabytes, and Chrome keeps it in its cache. After that a build takes a second or two, and an edit and run takes a fraction of a second. On a school network, the first build is the one that needs a moment.
The boards go well past the Uno: the Nano, the Mega 2560, the Leonardo, the Uno R4, several ESP32 boards, the ESP8266, the Raspberry Pi Pico, two STM32 boards and the micro:bit, all on the free plan. So do the parts a class reaches for: LEDs, buttons, potentiometers, servos, the HC-SR04 ultrasonic sensor, the DHT22, LCDs and OLEDs, 74HC logic chips and the 555 timer.
Chrome can also install Mokxi as an app from the address bar, so it opens in its own window with an icon on the shelf, like any other Chromebook app.
What a simulator cannot do
It cannot upload to a real board. Mokxi runs your code on a simulated chip in the browser; it does not flash an Arduino plugged into the USB port. If your class has hardware and Chromebooks, Arduino’s own answer is the Arduino Cloud Editor, which works on ChromeOS with an Arduino account and its Chromebook app, and uploads to the boards Arduino lists as supported there.
The two fit together well. Students design, wire and debug in the simulator, where a wrong wire costs nothing and there are enough parts for everyone, then build the finished circuit once on the bench. The sketch is standard Arduino code, so the same file uploads from the Cloud Editor.
A few libraries differ. Mokxi carries its own versions of the common ones under their usual names (Servo, Wire, LiquidCrystal_I2C, DHT, the Adafruit OLED headers), and each part’s help page says where it differs from the upstream library. A sketch that includes a library Mokxi does not have will not compile until you swap it.
Your first sketch on a Chromebook, step by step
Open the circuit above in the editor. It is an Uno with an LED and a 220 ohm resistor on pin 13, and a sketch that explains every line.
Press Run. The LED blinks once a second: on for half a second, off for half a second.
Change both delay(500) lines to delay(100) and press Run again. The build takes a moment the first time and is near instant after that. The LED now blinks five times as fast.
Add Serial.begin(9600); to setup() and Serial.println("on"); after the first digitalWrite, run it, and open the Serial tab. That is the serial monitor, the same tool the Arduino IDE has, working on a Chromebook.
When you want to keep it, sign in with Google, GitHub or an email address. Signed out, your work stays in this browser until its storage is cleared.
For teachers and school IT
Nothing needs to be pushed to the fleet. If a web filter blocks the editor or the compiler download, the school IT page lists the domains to allow. Student data rules are on the student privacy page, written for the questions a district asks.
The free plan has every board and every part. The class tools (a roster, starter projects, checks that grade a circuit automatically, submissions you can open and run) come with Pro and the Teacher plan, and the free 30-day trial, started from the class page, covers one class of up to forty students with every tool, once per teacher account, with no card.
Questions
Can you use Arduino on a Chromebook?
Yes, two ways. Mokxi simulates the board in Chrome with nothing to install, which is enough to learn, write and test sketches. To upload to a physical Arduino from a Chromebook, use the Arduino Cloud Editor.
Is the simulator free?
Yes. Every board and every part is on the free plan, and the editor opens and runs without an account. An account is needed to save to the cloud and share a project by link.
Does it work on a school-managed Chromebook?
Yes. It is a web page with no extension and no install. If the school’s filter blocks it, IT can allow the domains listed on the IT setup page.
Can I upload my sketch to a real Arduino from Mokxi?
No. Mokxi runs the code on a simulated chip. Copy the sketch into the Arduino IDE or the Arduino Cloud Editor to upload it to a board.
Keep going
Where the facts on this page come from
Build this for real
Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.