Skip to main content

Python module to control ch9329

Project description

ch9329

Python module to control ch9329

Installation

You can install the package via pip:

pip install ch9329

Usage

from serial import Serial

from ch9329 import keyboard
from ch9329 import mouse
from ch9329.config import get_manufacturer
from ch9329.config import get_product
from ch9329.config import get_serial_number

ser = Serial("COM3", 9600, timeout=0.05)

keyboard.press_and_release(ser, "a", modifiers=["ctrl"])
keyboard.write(ser, "Hello World\n")
keyboard.write(ser, "abcdefghijklmnopqrstuvwxyz\n")
keyboard.write(ser, "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n")
keyboard.write(ser, "0123456789\n")
keyboard.write(ser, "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\n")

mouse.move(ser, x=500, y=500)
mouse.move(ser, x=50, y=50, relative=True)
mouse.click(ser, button="left")

print(get_serial_number(ser))
# 20193152CFBF
print(get_product(ser))
# WCH UART TO KB-MS_V1.7
print(get_manufacturer(ser))
# WWW.WCH.CN

ser.close()

License

This project is licensed under the terms of the MIT license.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Contact

If you want to contact me you can reach me at pradish@sandbox.com.np.

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

ch9329-1.2.7.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

ch9329-1.2.7-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file ch9329-1.2.7.tar.gz.

File metadata

  • Download URL: ch9329-1.2.7.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for ch9329-1.2.7.tar.gz
Algorithm Hash digest
SHA256 cf2ea87d0d420373e258a980df5a3c3dc3d1089958b153391a81a66cb777c041
MD5 5c7316546d9631b7b67735cbbddf396e
BLAKE2b-256 5a0dd7110bca5e9658af4ad8f7e732cc98a386c81432b5fe6020a62d278be1d2

See more details on using hashes here.

File details

Details for the file ch9329-1.2.7-py3-none-any.whl.

File metadata

  • Download URL: ch9329-1.2.7-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for ch9329-1.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 96b902788e28b1cb90758a9bf668bedb6549ef58c921e37800bea5aa972117c1
MD5 22e0f39c8f220b3ff8c761b236175bbf
BLAKE2b-256 dc4f4b6cd0300c4b72d00e1da980c566f8f2dda2679a8722a6afe2234838c073

See more details on using hashes here.

Supported by

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