Host library and CLI for the Touchy-Pad USB multitouch device.
Project description
touchy-pad
Host-side Python library and CLI for the Touchy-Pad USB multitouch device.
Install
pip install touchy-pad
You will also need a working libusb-1.0 runtime on your host:
| Platform | Command |
|---|---|
| Debian | sudo apt install libusb-1.0-0 |
| macOS | brew install libusb |
| Windows | bundle libusb-1.0.dll next to your interpreter |
On Linux you also need a udev rule so non-root users can open the device.
A starter rule is shipped at ../bin/99-touchy-pad.rules.
CLI
touchy --help # list subcommands
touchy board-info # query device board, firmware, protocol version
touchy screen-wake # turn the backlight on
touchy events # live-tail events from the device
Library
The supported entry point is touchy_pad.api:
from touchy_pad.api import touchy_open
with touchy_open() as pad:
print("firmware:", pad.client.sys_version_get().firmware_version_str)
pad.on_host_event(0x100, lambda e: print("event", e))
# ...do work; events arrive on a background thread...
See docs/python-api.md for the full guide
and docs/python-api/ for auto-generated
reference docs (built with just build-docs).
Uploading images
Touchy.file_save accepts any Pillow-readable image (BMP, PNG,
JPEG, GIF, WebP) and transparently converts it to LVGL's native .bin
format before uploading, so the firmware (which only ships LVGL's
built-in bin decoder) can render it without extra config:
with touchy_open() as pad:
with open("avatar.png", "rb") as f:
pad.file_save("images/avatar.png", f.read()) # auto-converted
# Already-converted `.bin` payload, or any non-image bytes, pass
# through unchanged.
pad.file_save("screens/home.pb", screen.to_bytes())
Refer to the asset by its upload path (asset="images/avatar.png")
when constructing image(...) / image_button(...) widgets — both
support scale= and rotation= for runtime transforms, and
image_button also takes pressed_asset / pressed_scale /
pressed_rotation for a distinct pressed-state look.
Development
See docs/development.md for full setup instructions
(dev container or manual), day-to-day just recipes, and git hook details.
Project details
Release history Release notifications | RSS feed
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 touchy_pad-0.2.1.tar.gz.
File metadata
- Download URL: touchy_pad-0.2.1.tar.gz
- Upload date:
- Size: 74.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88a8944c50491df15baafaf54788d3bf5908db4cdf8a5429700091d41e7828aa
|
|
| MD5 |
618049fdcf7f2645075fcf0198398952
|
|
| BLAKE2b-256 |
6e461ced3cdae28982cae964ebd8929369bca496ceec6a19cf2ce3c932491644
|
Provenance
The following attestation bundles were made for touchy_pad-0.2.1.tar.gz:
Publisher:
release.yml on geeksville/touchy-pad
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
touchy_pad-0.2.1.tar.gz -
Subject digest:
88a8944c50491df15baafaf54788d3bf5908db4cdf8a5429700091d41e7828aa - Sigstore transparency entry: 1612849444
- Sigstore integration time:
-
Permalink:
geeksville/touchy-pad@2f27ef8ce34f4b5f38dee396feabc48b75f747e7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/geeksville
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f27ef8ce34f4b5f38dee396feabc48b75f747e7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file touchy_pad-0.2.1-py3-none-any.whl.
File metadata
- Download URL: touchy_pad-0.2.1-py3-none-any.whl
- Upload date:
- Size: 89.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c257f8b7656cec53770ffe6336fc72a0ff89dec980f5a2fb06e5d2312d2c56f6
|
|
| MD5 |
3defd6c2ad957cd5d4a3f8d55e084f36
|
|
| BLAKE2b-256 |
285893c73b059ba1f5fff0e2cf5a29fc21a220ea5110ebb01d670b42438cb37a
|
Provenance
The following attestation bundles were made for touchy_pad-0.2.1-py3-none-any.whl:
Publisher:
release.yml on geeksville/touchy-pad
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
touchy_pad-0.2.1-py3-none-any.whl -
Subject digest:
c257f8b7656cec53770ffe6336fc72a0ff89dec980f5a2fb06e5d2312d2c56f6 - Sigstore transparency entry: 1612849578
- Sigstore integration time:
-
Permalink:
geeksville/touchy-pad@2f27ef8ce34f4b5f38dee396feabc48b75f747e7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/geeksville
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f27ef8ce34f4b5f38dee396feabc48b75f747e7 -
Trigger Event:
release
-
Statement type: