> 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/web-block-base-programming/petoi-web-coding-blocks/setup-on-nyboard.md).

# Setup on NyBoard

The Petoi Web Coding Block can also be used for the robot, which uses the [NyBoard](https://docs.petoi.com/nyboard/overview) and the [WiFi module](/communication-modules/wifi-esp8266.md).

Please take a look at the related section in the Wi-Fi module for instructions on [hardware](https://docs.petoi.com/web-block-base-programming/petoi-web-coding-blocks/pages/-MY_xwWUGyQMiEPNsU2m#id-1.-connection) and software setup ([2.1 Add ESP8266 source to the board manager](https://docs.petoi.com/web-block-base-programming/petoi-web-coding-blocks/pages/-MY_xwWUGyQMiEPNsU2m#id-2.1-add-esp8266-source-to-the-board-manager) and [2.2 Configuration of the Module](https://docs.petoi.com/web-block-base-programming/petoi-web-coding-blocks/pages/-MY_xwWUGyQMiEPNsU2m#id-2.2-configuration-of-the-module)).

## Upload the WiFi Firmware to the WiFi module

Project URL：

<https://github.com/PetoiCamp/OpenCat-Quadruped-Robot/tree/main/ModuleTests/WebCoding8266>

There are two files in the project:

* WebCoding8266.ino: Arduino sketch.
* README.md： help document.

Please open the **WebCoding8266.ino** in the Arduino IDE and install the library **WiFiManager**, **WebSockets**, and **ArduinoJson** in the Library Manager:

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

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

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

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

Then connect the USB uploader, plugged into the WiFi module, to the computer via the USB data cable. Select the correct serial port and upload the sketch to the ESP8266 WiFi module as follows:

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

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

After the sketch is uploaded to the WiFi module, open the serial monitor in Arduino IDE. Then, unplug and re-plug the WiFi module into the USB uploader.

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

Open your smartphone's WiFi scanner and find an unencrypted access point named "Petoi-AP\*\*\*\*" (shown as in the serial monitor) and connect to it to configure the WiFi parameter of the module, let the WiFi module join the local network, and get a local IP address. For more details, please refer to the " [How to use](/communication-modules/wifi-esp8266.md#how-to-use)" section of the WiFi module.

<figure><img src="/files/2JyEHcmAZsQ6JAfHzW15" alt=""><figcaption></figcaption></figure>

After the WiFi module gets the IP address (as shown in the serial monitor above). &#x20;

Unplug the WiFi module from the USB uploader, plug it into the NyBoard, power on the robot, and enter the WiFi module's IP address in the coding block.&#x20;

Now you can use the web coding page to run the program:

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

<br>


---

# 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/web-block-base-programming/petoi-web-coding-blocks/setup-on-nyboard.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.
