Product description: ByteSwitch - 8 switches + 9 WS2812C RGB diodes - STM32G031 - Unit expansion module - M5Stack U191
The Unit ByteSwitch from M5Stack is an advanced input module based on the STM32G031 microcontroller . The board features eight independent toggle switches and nine WS2812C RGB LEDs that can dynamically indicate the state of each input. Thanks to I2C communication and two Grove connectors (Port.A), multiple modules can be cascaded , making it ideal for complex multi-input applications. It is designed to work with M5Stack controllers and is supported by UIFlow and the Arduino IDE.
Main features of the ByteSwitch Unit
- 8 DPDT switches : direct switching capability
- 9 built-in WS2812C RGB LEDs : dynamic status indication of each channel
- I2C communication with address 0x46 : simple integration with microcontrollers
- Cascading support : multiple units can be connected
- STM32G031G8U6 microcontroller : 32-bit ARM Cortex M0+ core clocked at 64 MHz
- Low power consumption : only 9.03 mA in standby mode
Pinouts and compatibility with M5Stack
The ByteSwitch module uses a Grove interface (4-pin with a 2mm pitch) that provides GND, 5V, SDA, and SCL signals. It can be connected to PORT.A, PORT.B, or PORT.C ports on the CoreS3 controller. The ByteSwitch is compatible with a wide range of M5Stack development modules, such as Core2 , StickC , AtomS3 , and others. The I2C address is 0x46 , allowing for easy identification and integration into larger projects.
Programming and integration
Unit ByteSwitch supports popular development environments: UIFlow 1.0, UIFlow 2.0, and the Arduino IDE . A library with usage examples is available in Arduino. In UIFlow, the module appears as a ready-made component, allowing for quick implementation of input and lighting functions without having to write code from scratch. Communication uses the I2C protocol, and the documentation includes detailed descriptions of commands and registers.
ByteSwitch module technical specifications
- Microcontroller: STM32G031G8U6, ARM Cortex M0+, 64 MHz
- Switches: 8 independent toggle switches (DPDT)
- LEDs: WS2812C-2020 (9 pcs.)
- Communication interface: I2C (address 0x46)
- Grove connectors: 2 x I2C (cascadable)
- Current consumption (standby): 5 V at 9.03 mA
- Operating temperature range: 0°C to 40°C
- Dimensions: 88.0 x 24 x 19.6 mm
- Weight: 22.5 g
Contents of the set
- 1x Unit ByteSwitch
- 1x Grove Cable (20cm)




