> For the complete documentation index, see [llms.txt](https://docs.petoi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.petoi.com/~/changes/MnaoHQ6wOvffal3XIPZR/upload-firmware.md).

# Upload Firmware

## Connect to the mainboard

### NyBoard

When you use a [USB uploader](https://docs.petoi.com/communication-modules/usb-downloader-ch340c) to upload the firmware for the **NyBoard**,  if there is **no** serial port in the port list of Device Manager.&#x20;

<div align="left"><figure><img src="/files/t845ynqudt61CnY0kVWb" alt="" width="375"><figcaption><p>Nybble</p></figcaption></figure> <figure><img src="/files/QFSgcrGDgYU3m9tKSn3z" alt="" width="375"><figcaption><p>Bittle</p></figcaption></figure></div>

<figure><img src="/files/3sSB2vSZupl5T66oQ9LB" alt=""><figcaption></figcaption></figure>

please download and install the driver:

* Mac: <http://www.wch-ic.com/download/CH341SER_MAC_ZIP.html>
* Windows: <http://www.wch-ic.com/downloads/CH341SER_EXE.html>
* Linux: <http://www.wch-ic.com/downloads/CH341SER_LINUX_ZIP.html>

### BiBoard

When you use a USB type-C data cable to upload the firmware for the **BiBoard**,  if there is **no** serial port in the port list of Device Manager.&#x20;

<figure><img src="/files/dHx9pOYm6CpIVsjzZOyT" alt=""><figcaption><p>Bittle X</p></figcaption></figure>

<figure><img src="/files/iWHiJdXpXOl2NKWucUEx" alt=""><figcaption></figcaption></figure>

please download and install the driver:

{% embed url="<https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads>" %}

For more details, please refer to [BiBoard Driver to access the serial port](https://docs.petoi.com/technical-support/useful-tools#biboard-driver-to-access-the-serial-port).

## Upload the firmware

There are two methods to Upload the firmware to the robot:

* The simplest method is to use the [**Petoi Desktop App**](https://docs.petoi.com/desktop-app/introduction). No programming is involved. You can play with some preset modes.&#x20;
* If you have some programming experience, you can use the [**Arduino IDE**](https://www.arduino.cc/en/software)[.](https://www.arduino.cc/en/software) You will be able to modify the open-source codes for your new projects.&#x20;
  * If you are using NyBoard, please refer to [**Upload Sketch for NyBoard**](https://docs.petoi.com/arduino-ide/upload-sketch-for-nyboard).
  * If you are using BiBoard, please refer to [**Upload Sketch for BiBoard**](https://docs.petoi.com/arduino-ide/upload-sketch-for-biboard).

{% hint style="danger" %}
If you have a NyBoard(with Bittle and Nybble), we highly recommend using the green USB programmer to upload the firmware. The Bluetooth dongle is not as stable and may cause the mainboard's bootloader to crash if interrupted in the middle.&#x20;

For BiBoard(with Bittile X), the USB/Bluetooth connections are built on the board already.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.petoi.com/~/changes/MnaoHQ6wOvffal3XIPZR/upload-firmware.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
