Arduino · ESP32 · Pico
Upload code to your board
Your project's code is ready, now it needs to reach the board. There are two ways: from an Android phone or tablet over a USB-OTG cable, or from a computer with Arduino IDE or Thonny.
What does uploading code to a board mean?
A board such as Arduino, ESP32 or Raspberry Pi Pico runs the program you put on it. Writing the code, or taking it from a BlueGrays project, is the first step; for the board to run it, the code has to be written into the board's memory over a USB cable. That is called uploading.
Once uploaded, the code stays on the board: unplug the cable and power the board from a battery or an adapter, and the program keeps running. The board does the same job until you upload new code.
Upload from an Android phone or tabletBeta
The BlueGrays Android app sends the code straight to your board over a USB-OTG cable. No computer, no Arduino IDE, no libraries to install: just tap "Upload to device" on the project page.
Supported boards
Arduino Uno and Nano
Clone Nanos with the old bootloader have their own option in the list.
ESP32
ESP32 development boards with a USB port. The upload goes through the bootloader automatically.
Raspberry Pi Pico
The code is written as main.py. The board needs MicroPython, which you install once from a computer.
What you need
- An Android phone or tablet with the BlueGrays app
- An OTG cable or adapter (USB-C or micro USB to USB-A, depending on your phone)
- A USB cable that carries data (charge-only cables do not show the board)
- A board that fits the project: Arduino Uno, Nano, ESP32 or Raspberry Pi Pico
Step by step
- 01
Open the project
In the app, open the project you want to upload and tap "Upload to device" under the code section.
- 02
Plug in the board
Connect the board to the phone with the OTG adapter and a data cable. When Android asks for permission, tap "OK".
- 03
Pick your board
The app suggests the board that fits the project. Pick the one that is plugged in.
- 04
Upload
Tap "Upload to board". The code is downloaded, written to the board and verified; keep the cable in until it finishes.
The feature is in beta. It is open to everyone on free projects; on Premium projects, uploading unlocks with Premium, just like the code. After the upload, the serial monitor in the app shows what the board sends over the same cable.
If the board does not show up
- The cable may be charge-only: try one that carries data.
- Some phones ship with OTG turned off: search for "OTG" in Settings and turn it on.
- On a clone Nano, pick "Arduino Nano (old bootloader)" from the list.
- If the ESP32 does not answer, hold the BOOT button and release it when "Writing" appears.
Upload from a computer
No Android device, or prefer working on a computer? Upload the code with Arduino IDE or Thonny. Just copy the code from the project page in the BlueGrays app or on this site.
Arduino Uno, Nano and ESP32: Arduino IDE
- 1Download and install Arduino IDE from arduino.cc.
- 2For ESP32, install the "esp32" package once from the Boards Manager.
- 3Copy the project's code and paste it into a new sketch. If the project uses libraries, install them from the Library Manager.
- 4Pick your board and port from the Tools menu, then press Upload.
Raspberry Pi Pico: Thonny
- 1Download and install Thonny from thonny.org.
- 2If the Pico has no MicroPython yet, plug it in while holding the BOOTSEL button; in Thonny, go to Tools › Options › Interpreter, choose "MicroPython (Raspberry Pi Pico)" and install MicroPython.
- 3Copy the project's code and paste it into a new file in Thonny.
- 4Save the file to the Pico as main.py. The board runs this code every time it starts.
Uploading from the browser is coming
We are working on uploading code to your board straight from this site, in Chrome or Edge on a computer, with nothing to install. We will announce it on this page when it is ready.
If you use an iPhone or iPad
iPhone and iPad do not let apps send code to a board over a USB cable, so the BlueGrays app for iPhone and iPad has no upload. You can keep exploring the project in the app and use an Android phone or tablet, or a computer, to upload the code. On projects with a Bluetooth module, the serial monitor works on iPhone too.
Frequently asked questions
Do I need a computer to upload code to a board?
No. The BlueGrays Android app uploads the code from your phone straight to the board over a USB-OTG cable. If you have a computer, you can also use Arduino IDE or Thonny.
Which boards can I upload to from a phone?
Arduino Uno, Arduino Nano (including clones with the old bootloader), ESP32 development boards with a USB port, and Raspberry Pi Pico with MicroPython installed.
Which cable do I need?
An OTG adapter or cable that fits your phone, and a USB cable that fits your board and carries data. Charge-only cables do not show the board.
Can I upload code from an iPhone?
No. iPhone and iPad do not let apps send code to a board over a USB cable. You can use an Android device or a computer instead.
Does the board have to stay connected after uploading?
No. The code stays in the board's memory; the program runs whenever the board gets power from a battery, an adapter or a power bank.
Pick a project to upload
Hundreds of projects with ready code, each with a circuit diagram, a parts list and step-by-step instructions.
