CirctuiPython Library for the Pimoroni Qw/ST Pad
This is a CircuitPython library for the Pimoroni Qw/ST Pad.
Installation
# Using uv
uv add circuitpython-qwstpad
# Using pip
pip install circuitpython-qwstpad
# Using pipkin
pipkin install circuitpython-qwstpad
Basic Example
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:
import usb_hid
usb_hid.enable((usb_hid.Device.KEYBOARD,))
Then set up the Qw/ST pad in code.py:
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.
Metadata
Release files for circuitpython-qwstpad 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| circuitpython_qwstpad-0.2.0.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| circuitpython_qwstpad-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / circuitpython_qwstpad-0.2.0.tar.gz
| Download URL | circuitpython_qwstpad-0.2.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1537e7736b080f3d0b73759b60bd8ed4f5e3249bddc324828843a6bcb14b1240
|
|
BLAKE2b-256 checksum How to use checksums |
940ab501f90150fcec86e98f8e803ab99325ae0062be06535884eee51d1f4f64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / circuitpython_qwstpad-0.2.0-py3-none-any.whl
| Download URL | circuitpython_qwstpad-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a31cecd096be685801d8658db50945e96649ce1db332e3143691332b22de9065
|
|
BLAKE2b-256 checksum How to use checksums |
6a324b2d48f2a42f714f4cb9765d7ef1af1cc4376a380fb561d13f259d2dc65c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|