The editor

Send a program to a real board

How to get a sketch from Mokxi onto your Arduino, ESP32 or Pico, on a computer, a Chromebook or an iPad.

The short answer

Press Send to board in the editor's header (it sits next to Export). A card opens with the steps that fit your board and your browser. Sending a sketch to a real board, by Upload or a .hex, .bin or .uf2 file, is part of Pro; on Free the button shows what Pro does and offers the free 7-day Pro trial (a card is needed, and nothing is charged if you cancel before it ends). Building and simulating stay free, a board's Arduino IDE steps stay free on every plan, and students in a class and children under 13 keep sending to boards whatever the plan.

  • Chrome or Edge on a computer or Chromebook: Mokxi builds the sketch and writes it to the board over a USB cable. Press Upload and pick the board's port.
  • Safari, Firefox, or an iPad or iPhone: these browsers cannot talk to a USB board, so there is no Upload button that works. The card says so, and gives you the file to download and the steps to finish with the Arduino IDE.

What each board gets

Board In Chrome or Edge In any other browser
Arduino Uno, Nano, Mega 2560, Leonardo, Micro, Pro Mini, Pro Micro Upload over USB Download the .hex file, then the Arduino IDE or avrdude
ESP32-C3 DevKitM-1, XIAO ESP32-C3, ESP32-C3 SuperMini Upload over USB (the button says Upload to board (Beta)) Download the .bin file, then esptool or the Arduino IDE
Raspberry Pi Pico, Pico W, XIAO RP2040, RP2040-Zero, Nano RP2040 Connect, XIAO SAMD21 A .uf2 file to drag onto the board's USB drive The same file, from a computer
micro:bit V2 A .hex file to drag onto the MICROBIT drive The same file, from a computer
ATtiny85, ATmega328P on a breadboard Download the .hex file and write it with a programmer (a USBasp, or an Uno running ArduinoISP) The same
ESP32, ESP32-S3, ESP32-C6 and ESP8266 boards without an Upload Put it on your board: the Arduino IDE steps, plus Test connection, which names the chip on the port The Arduino IDE steps
Every other board (Uno R4, STM32) Put it on your board: the Arduino IDE steps for that board The same

Test connection

Every card with an Upload button, and the Arduino IDE card of every ESP board, also has Test connection. It writes nothing. It asks for the port, resets the board, tries every bootloader Mokxi speaks (the Arduino ones at 115200 and 57600 baud, the Mega's, and the ESP chip loader), reads the chip's signature or id, and lets the sketch that was on the board run again. Then it says what it found and whether that is the board the project is for:

  • "Found an ATmega328P (signature 1E 95 0F), the chip in an Uno, a Nano or a Pro Mini, with the Arduino bootloader at 115200 baud. This matches the Arduino Uno. Ready to upload."
  • "Found an ESP32-S3, in its chip loader, but the project is for the ESP32-C3 DevKitM-1 (ESP32-C3). Pick an ESP32-S3 board (...) in Mokxi and try again, or plug in the ESP32-C3 DevKitM-1."
  • On a Nano, when the clone has the old bootloader: the card switches its Board list to Arduino Nano (old bootloader) for you.

Press it first when you are not sure which board is on the cable, which port is which, or whether the cable and driver work at all. On a Leonardo, Micro or Pro Micro it restarts the board and asks you to pick the port again, as Upload does.

The upload log

After any Upload or Test connection, the card shows a collapsed Upload log. It holds every byte sent to and received from the board, every change of the reset lines, and the time of each, with the board, the chip and the browser at the top. Nothing personal is in it. Copy log or Download log and paste it into a report: with it, a failure can be read without the board on the desk. "Tell us" beside an error sends it along by itself.

A sketch that uses WiFi cannot be sent from Mokxi yet (on an ESP32-C3 or a Pico W), because the WiFi here is simulated. Send one without WiFi, or build that one in the Arduino IDE with your own network name and password.

On a Pico, Pico W, XIAO RP2040 or RP2040-Zero, Serial comes out on pins GP0 (TX) and GP1 (RX) on the real board (the TX and RX pins on a Nano RP2040 Connect), not over the USB cable: read it with a 3.3V USB serial adapter.

How do I send a program to my Uno?

  1. Open your project in Chrome or Edge on a computer or Chromebook.
  2. Plug the Uno into it with a USB cable.
  3. Press Send to board, then Test connection, and pick the Uno's port from the list the browser shows. The card says what it found; "Ready to upload" means the next step will work.
  4. Press Upload and pick the same port.
  5. Wait for the bar to finish. Mokxi writes the sketch, reads every byte back, and only then says Done. Your sketch is running on the board.

If the list is empty or your board is not in it, see the next section. If the upload fails once, close the Arduino IDE and any serial monitor first: only one program can hold the port.

The port list is empty, or my board is not in it

The browser lists only the boards it can see. When yours is missing, the card opens Board not in the list? with these checks and a Try again button:

  • A data cable. Many USB cables only charge: the board lights up, but no port appears. Try a cable you know carries data.
  • The driver for the USB chip. Look at the small chip next to the board's USB socket, install its driver, then unplug the board and plug it back in.
    • CH340 or CH341 (most clones): Windows, macOS. Linux and ChromeOS have it built in.
    • CP2102 or CP2104: Windows and macOS. Linux and ChromeOS have it built in.
    • An original Uno, Mega or Leonardo needs nothing on macOS, Linux or ChromeOS; on Windows, installing the Arduino IDE adds its driver.
    • An ESP32-C3 on its own USB port (a XIAO or a SuperMini, listed as "USB JTAG/serial debug unit") needs no driver. If it is missing, hold BOOT while you plug it in.
  • Nothing else using the port. Close the Arduino IDE's Serial Monitor and Serial Plotter, PlatformIO, and any other tab with Mokxi open. A board that is listed but will not open is usually held by one of them. On Linux, if nothing else has it, add yourself to the dialout group (sudo usermod -aG dialout $USER), then log out and back in.
  • Chrome or Edge on a computer. Safari, Firefox, and every browser on an iPhone or iPad cannot reach USB boards, so the card gives you the .hex or .bin file to download instead, with the Arduino IDE steps.

How do I get my program onto an Arduino from an iPad?

Mokxi works in Safari on an iPad: you can build the circuit, write the code and run it there. Sending it to a board is the one thing an iPad cannot do, because Safari, and Chrome on an iPad (which is Safari underneath), have no way to reach a USB board.

Two ways to finish:

  • Use a computer for the last step. Sign in, open the same project on a computer with Chrome or Edge and press Send to board. Your projects are saved in your account, so they follow you.
  • Download the file and use the Arduino IDE. Press Send to board and Download .hex, then open it with the Arduino IDE (or copy the sketch into it) on a computer.

On a Chromebook

Chrome on a Chromebook has USB access, so Upload works for the boards in the table above, with nothing to install. On a school-managed Chromebook the administrator can switch USB access off (the DefaultSerialGuardSetting policy). If the port list stays empty, ask your IT team to allow it for mokxi.com, or use the download steps instead.

Using the downloaded file

For an Arduino board, the card shows the avrdude line for your board. In the Arduino IDE you can also copy the sketch (Copy sketch), pick your board under Tools, Board and press Upload. For an ESP32-C3, the card shows the esptool line and the offset to write the .bin at.