# 上传固件

当您使用USB上载模块为**NyBoard**上传固件时，请先下载并安装USB串口驱动程序：

* macOS: <http://www.wch.cn/download/CH341SER_MAC_ZIP.html>
* Windows: <http://www.wch.cn/download/CH341SER_EXE.html>
* Linux: <https://www.wch.cn/downloads/CH341SER_LINUX_ZIP.html>

为机器人上传固件有以下两种方法：

* 最简单的方法是使用 [**Petoi 桌面应用程序**](https://docs.petoi.com/v/chinese/zhuo-mian-ying-yong/zong-lan)，因为使用这种方法不涉及编程。 您可以上传一些预设模式。
* 如果您有一定的编程经验，可以使用 [**Arduino IDE**](https://www.arduino.cc/en/software) 修改我们的开源代码。
  * 如果您的机器人主板是NyBoard，请参考章节：[**为NyBoard上传程序**](https://docs.petoi.com/v/chinese/arduino-ide/wei-nyboard-shang-chuan-cheng-xu)
  * 如果您的机器人主板是BiBoard，请参考章节：[**为BiBoard上传程序**](https://docs.petoi.com/v/chinese/arduino-ide/wei-biboard-shang-chuan-cheng-xu)

{% hint style="danger" %}
无论用何种方法上传固件，请尽量使用有线上载器，因为蓝牙连接不够稳定，如果在中途受到干扰可能会导致引导程序崩溃。
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.petoi.com/chinese/shang-chuan-gu-jian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
