Warning: This project is currently in developement. Use at your own risk
Installation
pip install ch340_nrf
Usage
import ch340_nrf
import time
# Create a new instance of the ch340_nrf class
module = ch340_nrf.NRF("COM3")
# Get the system information
print(module.get_system_info())
# Send a message
module.send_message("Hello World!")
# Wait for a response
time.sleep(0.5)
# Print the response
print(module.get_message())
Reason
I made this library because there are no other libraries that allow you to use the ch340 nrf usb adapter with python. After reading the thread on the arduino forums here, I decided to make my own library. I hope this library helps you with your projects!
Dependencies
License
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
TODO
- Organize code better
- Add more documentation
- Add more examples
- Add more error handling
- Improve initialization time
- Improve reliablity
- Add async support
Thanks
Thanks for using ch340_nrf!
Release files for ch340-nrf 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ch340_nrf-0.1.4.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ch340_nrf-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / ch340_nrf-0.1.4.tar.gz
| Download URL | ch340_nrf-0.1.4.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f406859c57ddb4d7e4ab4109d030efcbec9e0d2d55fde63b94f63a0d209688f5
|
|
BLAKE2b-256 checksum How to use checksums |
291fc74438ce9fbc5b4761daa88d990b7a7acf16eac815098105c1c986b8b9e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / ch340_nrf-0.1.4-py3-none-any.whl
| Download URL | ch340_nrf-0.1.4-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37802ad54775ebf615b21674744ae48cf8c3440b45e0fe0891704d5b970f6717
|
|
BLAKE2b-256 checksum How to use checksums |
914ac3d3c373b41ca13405fcb77b1a7d4b95fac5e0e3080e19a94a0c36c67189
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|