Skip to main content
Version: Matrix OS 3.2

USB API

Preview notice​

The MatrixOS Python API is in preview and is subject to change; it may contain errors.

Overview​

The USB API in MatrixOS provides functions for managing USB connectivity and status. The USB API is available as MatrixOS.USB and is imported by default.

The Python USB API is implemented in Applications/Python/PikaPython/MatrixOS_USB.py with type hints in Applications/Python/PikaPython/_MatrixOS_USB.pyi.


MatrixOS.USB.Connected​

def Connected() -> bool

Checks if the device is connected to a USB host.

Returns:

  • bool: True if USB is connected, False otherwise

Comments