> For the complete documentation index, see [llms.txt](https://wiki.openelab.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.openelab.io/aiot/m5stack/m5stack-extend-i-o.md). Agents can also search and read this documentation through its [MCP server](https://wiki.openelab.io/~gitbook/mcp).

# M5Stack Extend I/O

{% hint style="info" %}
[**View M5Stack Extend I/O 2 Unit on OpenELAB**](https://openelab.io/products/m5stack-extend-io2-unit)

**Store SKU / option:** `M5-U011-B`. Match the purchased model and revision to the official reference below.
{% endhint %}

### M5Stack Extend I/O 2 Unit

***

### Product Link

{% embed url="<https://openelab.io/products/m5stack-extend-io2-unit>" %}

### Description <a href="#description" id="description"></a>

**EXT.IO2** is an `IO extended unit`, based on STM32F030 main controller, using I2C communication interface and providing 8 IO expansion. Each IO supports independent configuration of `digital I/O`, `ADC`, `SERVO control`, `RGB LED control` modes. Supports configuration of device I2C address, which means that users can mount multiple `EXT.IO2` UNITs on the same I2C BUS to extend more IO resources. Suitable for multiple digital/analog signal acquisition, with lighting/servo control applications.

### Features <a href="#features" id="features"></a>

* 8-channel input and output expansion.
  * Digital I/O
  * ADC input
  * SERVO control (PWM)
  * RGB LED control
* I2C communication interface:
  * Supports configuration of I2C address

### Applications <a href="#applications" id="applications"></a>

* IO Expansion
* Servo Control
* Multiple lighting control
* Multiple analog signal acquisition

### Specifications <a href="#specifications" id="specifications"></a>

| Specifications                | Parameters                                                |
| ----------------------------- | --------------------------------------------------------- |
| MCU                           | STM32F030                                                 |
| I2C Address                   | 0x45(default)                                             |
| Number of IO extensions       | 8                                                         |
| IO interface PIN spacing      | 2.54mm                                                    |
| IOSupport Mode                | Digital input/output, ADC, SERVO control, RGB LED control |
| IO Input/Output Level Support | 3.3V                                                      |
| Net Weight                    | 5g                                                        |
| Gross Weight                  | 13g                                                       |
| Product Size                  | 32\*24\*11mm                                              |
| Package Size                  | 93\*138mm                                                 |

### Pin Mapping <a href="#pin-mapping" id="pin-mapping"></a>

| M5Core(PORT A) | GPIO22 | GPIO21 | 5V | GND |
| -------------- | ------ | ------ | -- | --- |
| EXT.IO2 Unit   | SCL    | SDA    | 5V | GND |

### Schematics <a href="#schematics" id="schematics"></a>

<figure><img src="https://static-cdn.m5stack.com/resource/docs/products/unit/extio2/extio2_sch_01.webp" alt=""><figcaption></figcaption></figure>

### Protocol <a href="#protocol" id="protocol"></a>

<figure><img src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/products/unit/extio2/2024ab245eb708df4dcc36c00aee5b7.png" alt=""><figcaption></figcaption></figure>

### Communication protocols <a href="#communication-protocols" id="communication-protocols"></a>

MODE CONFIG

| REG  | DESC        | LEN    | R/W |
| ---- | ----------- | ------ | --- |
| 0x00 | MODE\_CH\_1 | 1 BYTE | R/W |
| 0x01 | MODE\_CH\_2 | 1 BYTE | R/W |
| 0x02 | MODE\_CH\_3 | 1 BYTE | R/W |
| 0x03 | MODE\_CH\_4 | 1 BYTE | R/W |
| 0x04 | MODE\_CH\_5 | 1 BYTE | R/W |
| 0x05 | MODE\_CH\_6 | 1 BYTE | R/W |
| 0x06 | MODE\_CH\_7 | 1 BYTE | R/W |
| 0x07 | MODE\_CH\_8 | 1 BYTE | R/W |

* Value:

```c
DIGITAL_INPUT_MODE=0 
DIGITAL_OUTPUT_MODE=1 
ADC_INPUT_MODE=2
SERVO_CTL_MODE=3 
RGB_LED_MODE=4
 
```

DIGITAL INPUT/OUTPUT

| REG  | DESC                       | LEN    | R/W |
| ---- | -------------------------- | ------ | --- |
| 0x10 | OUTPUT\_CTL\_REG\_CH\_1    | 1 BYTE | W   |
| 0x11 | OUTPUT\_CTL\_REG\_CH\_2    | 1 BYTE | W   |
| 0x12 | OUTPUT\_CTL\_REG\_CH\_3    | 1 BYTE | W   |
| 0x13 | OUTPUT\_CTL\_REG\_CH\_4    | 1 BYTE | W   |
| 0x14 | OUTPUT\_CTL\_REG\_CH\_5    | 1 BYTE | W   |
| 0x15 | OUTPUT\_CTL\_REG\_CH\_6    | 1 BYTE | W   |
| 0x16 | OUTPUT\_CTL\_REG\_CH\_7    | 1 BYTE | W   |
| 0x17 | OUTPUT\_CTL\_REG\_CH\_8    | 1 BYTE | W   |
| 0x20 | DIGITAL\_INPUT\_REG\_CH\_1 | 1 BYTE | R   |
| 0x21 | DIGITAL\_INPUT\_REG\_CH\_2 | 1 BYTE | R   |
| 0x22 | DIGITAL\_INPUT\_REG\_CH\_3 | 1 BYTE | R   |
| 0x23 | DIGITAL\_INPUT\_REG\_CH\_4 | 1 BYTE | R   |
| 0x24 | DIGITAL\_INPUT\_REG\_CH\_5 | 1 BYTE | R   |
| 0x25 | DIGITAL\_INPUT\_REG\_CH\_6 | 1 BYTE | R   |
| 0x26 | DIGITAL\_INPUT\_REG\_CH\_7 | 1 BYTE | R   |
| 0x27 | DIGITAL\_INPUT\_REG\_CH\_8 | 1 BYTE | R   |

* Value:

```c
HIGH:1 / LOW:0
 
```

8B ANALOG INPUT

| REG  | DESC                                                 | LEN    | R/W |
| ---- | ---------------------------------------------------- | ------ | --- |
| 0x30 | <p>ANALOG\_INPUT\_8B\_REG\_CH\_1<br>Value: 0-255</p> | 1 BYTE | R   |
| 0x31 | <p>ANALOG\_INPUT\_8B\_REG\_CH\_2<br>Value: 0-255</p> | 1 BYTE | R   |
| 0x32 | <p>ANALOG\_INPUT\_8B\_REG\_CH\_3<br>Value: 0-255</p> | 1 BYTE | R   |
| 0x33 | <p>ANALOG\_INPUT\_8B\_REG\_CH\_4<br>Value: 0-255</p> | 1 BYTE | R   |
| 0x34 | <p>ANALOG\_INPUT\_8B\_REG\_CH\_5<br>Value: 0-255</p> | 1 BYTE | R   |
| 0x35 | <p>ANALOG\_INPUT\_8B\_REG\_CH\_6<br>Value: 0-255</p> | 1 BYTE | R   |
| 0x36 | <p>ANALOG\_INPUT\_8B\_REG\_CH\_7<br>Value: 0-255</p> | 1 BYTE | R   |
| 0x37 | <p>ANALOG\_INPUT\_8B\_REG\_CH\_8<br>Value: 0-255</p> | 1 BYTE | R   |

12B ANALOG INPUT

| REG  | DESC                                                   | LEN    | R/W |
| ---- | ------------------------------------------------------ | ------ | --- |
| 0x40 | <p>ANALOG\_INPUT\_12B\_REG\_CH\_1<br>Value: 0-4095</p> | 2 BYTE | R   |
| 0x42 | <p>ANALOG\_INPUT\_12B\_REG\_CH\_2<br>Value: 0-4095</p> | 2 BYTE | R   |
| 0x44 | <p>ANALOG\_INPUT\_12B\_REG\_CH\_3<br>Value: 0-4095</p> | 2 BYTE | R   |
| 0x46 | <p>ANALOG\_INPUT\_12B\_REG\_CH\_4<br>Value: 0-4095</p> | 2 BYTE | R   |
| 0x48 | <p>ANALOG\_INPUT\_12B\_REG\_CH\_5<br>Value: 0-4095</p> | 2 BYTE | R   |
| 0x4A | <p>ANALOG\_INPUT\_12B\_REG\_CH\_6<br>Value: 0-4095</p> | 2 BYTE | R   |
| 0x4C | <p>ANALOG\_INPUT\_12B\_REG\_CH\_7<br>Value: 0-4095</p> | 2 BYTE | R   |
| 0x4E | <p>ANALOG\_INPUT\_12B\_REG\_CH\_8<br>Value: 0-4095</p> | 2 BYTE | R   |

SERVO ANGLE CTL

| REG  | DESC                                                   | LEN    | R/W |
| ---- | ------------------------------------------------------ | ------ | --- |
| 0x50 | <p>SERVO\_ANGLE\_8B\_REG\_CH\_1<br>Value: 0-180deg</p> | 1 BYTE | R/W |
| 0x51 | <p>SERVO\_ANGLE\_8B\_REG\_CH\_2<br>Value: 0-180deg</p> | 1 BYTE | R/W |
| 0x52 | <p>SERVO\_ANGLE\_8B\_REG\_CH\_3<br>Value: 0-180deg</p> | 1 BYTE | R/W |
| 0x53 | <p>SERVO\_ANGLE\_8B\_REG\_CH\_4<br>Value: 0-180deg</p> | 1 BYTE | R/W |
| 0x54 | <p>SERVO\_ANGLE\_8B\_REG\_CH\_5<br>Value: 0-180deg</p> | 1 BYTE | R/W |
| 0x55 | <p>SERVO\_ANGLE\_8B\_REG\_CH\_6<br>Value: 0-180deg</p> | 1 BYTE | R/W |
| 0x56 | <p>SERVO\_ANGLE\_8B\_REG\_CH\_7<br>Value: 0-180deg</p> | 1 BYTE | R/W |
| 0x57 | <p>SERVO\_ANGLE\_8B\_REG\_CH\_8<br>Value: 0-180deg</p> | 1 BYTE | R/W |

SERVO PULSE CTL

| REG  | DESC                                                      | LEN    | R/W |
| ---- | --------------------------------------------------------- | ------ | --- |
| 0x60 | <p>SERVO\_PULSE\_16B\_REG\_CH\_1<br>Value: 500-2500us</p> | 2 BYTE | R/W |
| 0x62 | <p>SERVO\_PULSE\_16B\_REG\_CH\_2<br>Value: 500-2500us</p> | 2 BYTE | R/W |
| 0x64 | <p>SERVO\_PULSE\_16B\_REG\_CH\_3<br>Value: 500-2500us</p> | 2 BYTE | R/W |
| 0x66 | <p>SERVO\_PULSE\_16B\_REG\_CH\_4<br>Value: 500-2500us</p> | 2 BYTE | R/W |
| 0x68 | <p>SERVO\_PULSE\_16B\_REG\_CH\_5<br>Value: 500-2500us</p> | 2 BYTE | R/W |
| 0x6A | <p>SERVO\_PULSE\_16B\_REG\_CH\_6<br>Value: 500-2500us</p> | 2 BYTE | R/W |
| 0x6C | <p>SERVO\_PULSE\_16B\_REG\_CH\_7<br>Value: 500-2500us</p> | 2 BYTE | R/W |
| 0x6E | <p>SERVO\_PULSE\_16B\_REG\_CH\_8<br>Value: 500-2500us</p> | 2 BYTE | R/W |

RGB LED CTL

| REG  | DESC                         | LEN    | R/W |
| ---- | ---------------------------- | ------ | --- |
| 0x70 | RGB\_24B\_REG\_CH\_1：RGB 888 | 3 BYTE | R/W |
| 0x73 | RGB\_24B\_REG\_CH\_2：RGB 888 | 3 BYTE | R/W |
| 0x76 | RGB\_24B\_REG\_CH\_3：RGB 888 | 3 BYTE | R/W |
| 0x79 | RGB\_24B\_REG\_CH\_4：RGB 888 | 3 BYTE | R/W |
| 0x7C | RGB\_24B\_REG\_CH\_5：RGB 888 | 3 BYTE | R/W |
| 0x7F | RGB\_24B\_REG\_CH\_6：RGB 888 | 3 BYTE | R/W |
| 0x82 | RGB\_24B\_REG\_CH\_7：RGB 888 | 3 BYTE | R/W |
| 0x85 | RGB\_24B\_REG\_CH\_8：RGB 888 | 3 BYTE | R/W |

Note: Do not write to the I2C address configuration register repeatedly at high frequency.

CONFIG

| REG  | DESC                                                                | LEN    | R/W |
| ---- | ------------------------------------------------------------------- | ------ | --- |
| 0xFE | FW VERSION                                                          | 1 BYTE | R   |
| 0xFF | I2C ADDR CONFIG (warn: Repeated writing may cause partition damage) | 1 BYTE | R/W |

### Model Size <a href="#model-size" id="model-size"></a>

<figure><img src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/products/unit/extio2/3ad33fb83c15cac23cfb9ae5dccf684.png" alt=""><figcaption></figcaption></figure>

### Compatible

<figure><img src="https://1292444914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtgOfPnscWebs1eh82EKq%2Fuploads%2FWL6MzLpQgd2NtI9odKS6%2Fimage.png?alt=media&amp;token=b59b2028-3ac0-41c8-8165-b628db8e2ad4" alt=""><figcaption></figcaption></figure>

## Official documentation and development resources

Use [Unit EXT.IO2](https://docs.m5stack.com/en/unit/Unit_EXT.IO2) for the manufacturer's complete model reference, diagrams and maintained examples. The official product code is **`U011-B`**; match the board/Unit label before choosing a firmware or host example. The references below complement this guide's local instructions.

| Development need                           | Model-specific reference                                                                                                                   |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Electrical schematic                       | [Read electrical schematic](https://m5stack-doc.oss-cn-shenzhen.aliyuncs.com/574/Sch_UNIT-EXTIO2.pdf)                                      |
| Mechanical / CAD files                     | [Read mechanical / cad files](https://github.com/m5stack/M5_Hardware/tree/master/Products/U011-B_Unit_EXT.IO2/Structures)                  |
| Mechanical / CAD files                     | [Read mechanical / cad files](https://github.com/m5stack/M5_Hardware/blob/master/Products/U011-B_Unit_EXT.IO2/Structures/Unit_EXT.IO2.stl) |
| Arduino development tutorial               | [Read arduino development tutorial](https://docs.m5stack.com/en/arduino/projects/unit/unit_extio2)                                         |
| Official source: M5Unit-EXTIO2-Internal-FW | [Read official source: m5unit-extio2-internal-fw](https://github.com/m5stack/M5Unit-EXTIO2-Internal-FW)                                    |

Keep the example's host model, interface pins and dependency versions together when reproducing a result. A schematic or SDK link does not establish that another revision uses the same wiring. Official model pages and accessible tutorial links reviewed **23 November 2026**. Other downloads above are manufacturer-listed resources; listing a file is not a test of its contents. Compilation, firmware flashing and hardware operation were **not performed** in this review.
