pip install ch340_nrf
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())
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!
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
- Organize code better
- Add more documentation
- Add more examples
- Add more error handling
- Improve initialization time
- Improve reliablity
- Add async support
Thanks for using ch340_nrf!