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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file circuitpython_qwstpad-0.2.0.tar.gz.
File metadata
- Download URL: circuitpython_qwstpad-0.2.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1537e7736b080f3d0b73759b60bd8ed4f5e3249bddc324828843a6bcb14b1240
|
|
| MD5 |
547aa388fe924e8762d34c7ac6641463
|
|
| BLAKE2b-256 |
940ab501f90150fcec86e98f8e803ab99325ae0062be06535884eee51d1f4f64
|
File details
Details for the file circuitpython_qwstpad-0.2.0-py3-none-any.whl.
File metadata
- Download URL: circuitpython_qwstpad-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a31cecd096be685801d8658db50945e96649ce1db332e3143691332b22de9065
|
|
| MD5 |
4539b75d4540579ef7509750ba0dcde5
|
|
| BLAKE2b-256 |
6a324b2d48f2a42f714f4cb9765d7ef1af1cc4376a380fb561d13f259d2dc65c
|