Metadata-Version: 2.4
Name: circuitpython-qwstpad
Version: 0.2.0
Summary: Library for accessing the Pimoroni Qw/ST Pad in CircuitPython
Author: Michael Twomey
Author-email: Michael Twomey <mick@twomeylee.name>
License-Expression: MIT
License-File: LICENSE
Requires-Dist: adafruit-circuitpython-debouncer>=2.0.15
Requires-Dist: adafruit-circuitpython-hid>=6.1.10
Requires-Dist: community-circuitpython-tca9555>=0.2.2
Requires-Python: >=3.6
Project-URL: Homepage, https://codeberg.org/micktwomey/circuitpython-qwstpad
Project-URL: Repository, https://codeberg.org/micktwomey/circuitpython-qwstpad
Description-Content-Type: text/markdown

# CirctuiPython Library for the Pimoroni Qw/ST Pad

This is a CircuitPython library for the [Pimoroni Qw/ST Pad](https://shop.pimoroni.com/products/qwst-pad?variant=53514400596347).

# Installation

```sh
# Using uv
uv add circuitpython-qwstpad

# Using pip
pip install circuitpython-qwstpad

# Using pipkin
pipkin install circuitpython-qwstpad
```

# Basic Example

```python
import board

from circuitpython_qwstpad import qwstpad

i2c = board.I2C()
pad = qwstpad.get_qwstpad(i2c)
pad.led_1 = True

print(f"Button A pressed? {pad.button_a}")
```

# Using as a USB keyboard Game Controller

You can make the pico emulate a USB keyboard, using the Qw/ST pad as an input. This works with games and systems like the PICO-8.

To enable this you need to edit boot.py and code.py.

First enable USB HID in `boot.py`:

```python
import usb_hid

usb_hid.enable((usb_hid.Device.KEYBOARD,))
```

Then set up the Qw/ST pad in `code.py`:

```python
from circuitpython_qwstpad import usb_keyboard

usb_keyboard.main(usb_keyboard.PICO_8_PLAYER_1)
```

This will configure the gamepad to act as a PICO-8 controller.
