> 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/extensible-modules/mu-camera.md).

# MU Camera

## Function introduction

Petoi Intelligent Vision Sensor can recognize many objects with a deep-learning algorithm. For example, it can detect color blocks, balls, the human body, and cards. Its detection result can be transmitted through the UART or I2C interface. MU is compact, has low power consumption, processes all algorithms locally, and can be widely used in intelligent toys, AI+STEAM lessons, creators, and other products or fields.

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

## Software setup

* You can use the Firmware Uploader within the Petoi Desktop App.

{% hint style="info" %}
Currently, the [Petoi Desktop App](https://docs.petoi.com/desktop-app/firmware-uploader) only supports **Bittle**, **NyBoard**, and software version **2.0**; please select **Camera** as the mode for the board versions NyBoard\_V1\_x.
{% endhint %}

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

* You can also use [Arduino IDE](https://www.arduino.cc/en/software) for the most freedom to upload and modify the codes.&#x20;

1. First, download and install the [MU camera library](https://github.com/mu-opensource/MuVisionSensor3) into your Arduino IDE.&#x20;

![](/files/eyTxsfLrQaJAOuM0qJUE)

![](/files/EQlLMylYN6ORziWC9Yzs)

2\. Use the latest [OpenCat](https://github.com/PetoiCamp/OpenCathttps://github.com/PetoiCamp/OpenCat)/[OpenCatEsp32](https://github.com/PetoiCamp/OpenCatEsp32) code to finish the setup.&#x20;

### NyBoard using **OpenCat.ino**

![](/files/3EpiRpMSeZrSwCbxcHtS)

If you have already uploaded the latest OpenCat code to make Bittle / Bittle X walk, you only need to uncomment **`#define CAMERA`** at the beginning of OpenCat.ino, then upload the code.&#x20;

If unsure, you need to finish the [upload process for the standard mode](https://docs.petoi.com/arduino-ide/upload-sketch-for-nyboard) (Step 1 to Step 10) to ensure everything is configured correctly, then upload the code in the camera mode.&#x20;

### BiBoard using **OpenCatEsp32.ino**

Set the [development environment](https://docs.petoi.com/arduino-ide/upload-sketch-for-biboard#id-2.-set-up-biboard) for BiBoard and modify the source code as follows:

<figure><img src="/files/0XpN3lqDrJ1TeMI1rMjM" alt=""><figcaption></figcaption></figure>

##

## Hardware setup

After uploading the firmware, switch the dial switches on the MU Vision Sensor and connect to the mainboard with wire as shown in the following picture:

### NyBoard

![](/files/QzFpHEjV6LsCDgFg2ITG)

### BiBoard

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

{% hint style="info" %}
Note: The position of the left and right switches (left: down and up; right: down and down) must be dialed to the position shown in the figure.
{% endhint %}

Fix the end connected to the camera to the robot's head (included in Bittle's / Bittle X's mouth).

If the camera code is uploaded correctly, Bittle / Bittle X maintains the rest position. Success messages are printed on the [serial monitor](https://docs.petoi.com/arduino-ide/serial-monitor) of Arduino IDE. When the MU Vision Sensor recognizes a target, the two LEDs will turn blue, and Bittle's / Bittle X's head can follow the target and swing left and right. The demo code will auto-switch the target between a yellow tennis ball and a human body if it fails to find any object.

<div align="center"><img src="/files/FeOweEZfrMJP0xaOXL6i" alt=""></div>

## FAQ

{% hint style="info" %}
If the MU Vision Sensor cannot identify the target object, please press the reset button on the camera, then press the reset button on the main board.
{% endhint %}

{% hint style="warning" %}
While the MU Vision Sensor connects with BiBoard if the white LED on the back of the MU Vision Sensor isn't lit up.

Please plug in the battery to the BiBoard and long-press the button on the battery to power the BiBoard. Then, click the camera's reset button and the main board's reset button in order.
{% endhint %}

For more details, please refer to [the Technical Support Document](https://morpx-docs.readthedocs.io/en/latest/MUVS3/introduction.html).

## Demos

The demo video is as follows:

{% embed url="<https://www.youtube.com/watch?v=CxGI-MzCGWM>" %}


---

# 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/extensible-modules/mu-camera.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.
