Python module to control the ch9329
Project description
pych9329
Python module to control ch9329
Installation
You can install the package via pip:
pip install pych9329
Usage
from serial import Serial
from pych9329 import keyboard
from pych9329 import mouse
from pych9329.chip_command import get_manufacturer
from pych9329.chip_command import get_product
from pych9329.chip_command import get_serial_number
def main():
ser = Serial("COM10", 9600, timeout=0.50)
keyboard.click(ser, "a")
keyboard.click(ser, "A")
keyboard.send_text_data(ser, "\n")
keyboard.send_text_data(ser, "Hello World\n")
keyboard.send_text_data(ser, "abcdefghijklmnopqrstuvwxyz\n")
keyboard.send_text_data(ser, "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n")
keyboard.send_text_data(ser, "0123456789\n")
keyboard.send_text_data(ser, "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\n")
mouse.move(ser, x=500, y=500)
mouse.move(ser, x=50, y=50, relative_mode=True)
# For supported key names, please see mouse.MOUSE_BUTTON_NAME_MAP
mouse.click(ser, button_name="left")
# 2019A152BB40
print(get_serial_number(ser))
# WCH UART TO KB-MS_V1.8
print(get_product(ser))
# WWW.WCH.CN
print(get_manufacturer(ser))
ser.close()
if __name__ == "__main__":
main()
License
MIT license.
Contributing
This project is modified from ch9329 library.
Thanks to the original author of the ch9329 library Pradish Bijukchhe
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
pych9329-0.1.5.tar.gz
(10.2 kB
view details)
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
pych9329-0.1.5-py3-none-any.whl
(12.4 kB
view details)
File details
Details for the file pych9329-0.1.5.tar.gz.
File metadata
- Download URL: pych9329-0.1.5.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.1 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
517e0edde16fb73a6b513f5eef729ecb6d789517d59221a91b0ecf195387863f
|
|
| MD5 |
af69e27e87b26e9a5576c8140b32bcfb
|
|
| BLAKE2b-256 |
2b24c0cb00273181fb1d5b80d77a5076f9c5b6fed42f4444c62bf776709bf35a
|
File details
Details for the file pych9329-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pych9329-0.1.5-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.1 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87026606d522207873c176bf13c1ac4afd7096c2e134a388c5c92ad8af5c2070
|
|
| MD5 |
387c167581ecf19d89756e3dbd9bd0d8
|
|
| BLAKE2b-256 |
4566326f4ebcd3e794fae4a1bb45e364c6cb8ccab60c41b99f480665b9658754
|