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 14-day Pro trial, with no card. 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 Download the .bin file, then esptool or the Arduino IDE
Raspberry Pi Pico, Pico W, 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 Download the .hex file and write it with a programmer The same
Every other board (Uno R4, other ESP32 boards, ESP8266, STM32) The Arduino IDE steps for that board The same

A sketch that uses WiFi cannot be uploaded from Mokxi yet, because the WiFi here is simulated. Upload one without WiFi, or build that one in the Arduino IDE with your own network name and password.

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 Upload.
  4. Pick the Uno's port from the list the browser shows and press Connect.
  5. Wait for the bar to finish. The sketch starts on the board by itself.

If the list is empty, try another cable (some only charge), and on Windows or older boards install the driver for the USB chip (CH340 or CP210x). If the upload fails once, close the Arduino IDE and any serial monitor first: only one program can hold the port.

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.