Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

touchy_pad-0.2.5.tar.gz (95.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

touchy_pad-0.2.5-py3-none-any.whl (113.3 kB view details)

Uploaded Python 3

File details

Details for the file touchy_pad-0.2.5.tar.gz.

File metadata

  • Download URL: touchy_pad-0.2.5.tar.gz
  • Upload date:
  • Size: 95.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for touchy_pad-0.2.5.tar.gz
Algorithm Hash digest
SHA256 6411ffa059026df45ef6a07a60b372cf7d00d52b26dba926d2184b78995f6fc4
MD5 64c292c95eef57937f75c8f77485613c
BLAKE2b-256 fa4f6018b0d45329a20f9bb810d2466208f32a7da987f7a153af3c9fabdaa8c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for touchy_pad-0.2.5.tar.gz:

Publisher: release.yml on geeksville/touchy-pad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file touchy_pad-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: touchy_pad-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 113.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for touchy_pad-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7e21be5f52f4e8810aaa4ad9a98e2c358f32cc9d6eea017e3b3885a23d507a23
MD5 a28503fc7aed968399e4ab9e9e00d126
BLAKE2b-256 264907f837455d97b46045b716e8cfc5ae708b34de78d53f9b19e9d2a9d7bfa4

See more details on using hashes here.

Provenance

The following attestation bundles were made for touchy_pad-0.2.5-py3-none-any.whl:

Publisher: release.yml on geeksville/touchy-pad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page