The Unit EXT.IO2 / Stamp IO component expands GPIO, ADC, PWM, and other input/output functions over I2C.


| Item | Information |
|---|---|
| Product Name | Unit EXT.IO2 / Stamp IO |
| SKU | U011-B / S002 |
| Main Function | GPIO, ADC, and PWM expansion |
| Communication Interface | I2C |
| Default I2C Address | 0x45 |
| ESPHome Component | extio2 (external component) |
| ESPHome Version | / |
Add the External Components configuration to the YAML file to load the EXT.IO2 / Stamp IO component.
external_components:
- source: github://m5stack/esphome-yaml/components
components: [extio2]
refresh: 0s Add the Hub component before using any EXT.IO2 functions:
extio2:
id: extio2_hub 0x45.true.1kHz.2kHz1kHz500Hz250Hz125HzEXT.IO2 pins can be used wherever ESPHome accepts a standard GPIO pin reference, for example in switch and binary_sensor components.
# Digital output - switch
switch:
- platform: gpio
name: "EXT.IO2 GPIO 0"
pin:
extio2_id: extio2_hub
number: 0
mode:
output: true
# Digital input - binary sensor
binary_sensor:
- platform: gpio
name: "EXT.IO2 GPIO 1"
pin:
extio2_id: extio2_hub
number: 1 0-7.false.input or output, with optional pullup, pulldown, or open_drain flags.The sensor platform reads analog values from eight ADC-capable pins.
sensor:
- platform: extio2
extio2_id: extio2_hub
name: "ADC Sensors 0"
channel: ADC_0
resolution: 12BIT
update_interval: 5s ADC_0 to ADC_7.8BIT.8BIT: 8-bit resolution, range 0-255.12BIT: 12-bit resolution, range 0-4095.60s.The output platform drives any pin as a PWM output. The duty cycle is represented as a floating-point value from 0.0 to 1.0, internally mapped to 0-100%.
output:
- platform: extio2
extio2_id: extio2_hub
id: pwm_ch0
channel: PWM_0
light:
- platform: monochromatic
name: "PWM Light 0"
output: pwm_ch0
effects:
- pulse: PWM_0 to PWM_7.pwm_freq; all PWM channels share the same frequency.The number platform controls servos in two modes: angle (degrees) and pulse width (microseconds).
Controls the servo position by angle (0-180 degrees).
number:
- platform: extio2
extio2_id: extio2_hub
name: "Servo 0"
type: angle
channel: SERVO_0
min_value: 0
max_value: 180
step: 3 Controls the servo using the raw pulse width (microseconds).
number:
- platform: extio2
extio2_id: extio2_hub
name: "Servo 1"
type: pulse
channel: SERVO_1
min_value: 500
max_value: 2500
step: 100 angle: angle control.pulse: pulse-width control.SERVO_0 to SERVO_7.0.0 in angle mode and 500.0 in pulse mode.180.0 in angle mode and 2500.0 in pulse mode.3.0 in angle mode and 100.0 in pulse mode.| Mode | Unit | Minimum | Maximum | Step |
|---|---|---|---|---|
angle | ° | 0 | 180 | 3 |
pulse | us | 500 | 2500 | 100 |
The light platform supports two modes: a single RGB LED on a specified pin, or an addressable LED strip using consecutive pins starting at pin 0.
Controls a single RGB LED on the specified pin.
light:
- platform: extio2
extio2_id: extio2_hub
name: "EXT.IO2 Light 2"
type: light
channel: LIGHT_2 Controls consecutive RGB LEDs starting at pin 0 and supports all ESPHome addressable-light effects.
light:
- platform: extio2
extio2_id: extio2_hub
name: "LED Strip"
type: addressable_light
num_leds: 8 light: single RGB LED.addressable_light: addressable LED strip.light, enum): pin to use, from LIGHT_0 to LIGHT_7.addressable_light, int): number of LEDs, range 1-8, assigned consecutively starting at pin 0.num_leds: 3 uses pins 0, 1, and 2. The hardware has no brightness-control register; brightness is implemented by scaling the RGB values in software.This example demonstrates the GPIO input/output, ADC, PWM, servo, and RGB light platforms. Adjust the controller I2C pins to match the actual wiring.
i2c:
sda: GPIO2
scl: GPIO1
extio2:
id: extio2_hub
address: 0x45
reset: true
pwm_freq: 1kHz
# GPIO - digital output
switch:
- platform: gpio
name: "EXT.IO2 GPIO 0"
pin:
extio2_id: extio2_hub
number: 0
mode:
output: true
# GPIO - digital input
binary_sensor:
- platform: gpio
name: "EXT.IO2 GPIO 1"
pin:
extio2_id: extio2_hub
number: 1
mode:
input: true
pullup: true
# ADC sensor
sensor:
- platform: extio2
extio2_id: extio2_hub
name: "ADC Sensors 2"
channel: ADC_2
resolution: 12BIT
update_interval: 5s
# PWM output used as a monochromatic light
output:
- platform: extio2
extio2_id: extio2_hub
id: pwm_ch3
channel: PWM_3
light:
- platform: monochromatic
name: "PWM Light 3"
output: pwm_ch3
effects:
- pulse:
# Single RGB LED
- platform: extio2
extio2_id: extio2_hub
name: "RGB Light 6"
type: light
channel: LIGHT_6
# Addressable LED strip (all 8 pins)
- platform: extio2
extio2_id: extio2_hub
name: "LED Strip"
type: addressable_light
num_leds: 8
number:
# Servo - angle control
- platform: extio2
extio2_id: extio2_hub
name: "Servo 4"
type: angle
channel: SERVO_4
# Servo - pulse-width control
- platform: extio2
extio2_id: extio2_hub
name: "Servo 5"
type: pulse
channel: SERVO_5