Arduino Serial Communication Python Library
This Python library provides a convenient interface for communicating with Arduino boards via serial communication. It allows you to detect connected Arduino boards, establish serial connections, send data, and receive data from the Arduino board.
Features
- Auto Detection: Automatically detects available Arduino (uno R3) boards connected to the computer.
- Connection Handling: Easily establish serial connections with detected Arduino boards.
- Data Transmission: Send data over the serial connection to Arduino boards.
- Data Reception: Read data from Arduino boards and process it in real-time.
- Multithreading Support: Receive data asynchronously using multithreading for responsive communication.
Installation
To use this library, you'll need Python installed on your system. If you haven't already, download and install Python from python.org.
pip install arduinoserial2
Usage
Here's a quick guide on how to use the library in your Python project:
1. Import the Library
pythonCopy code
import arduinoserial2 as as2
2. Detect Arduino Boards
pythonCopy code
import arduinoserial2 as as2
as2.detect()
Output
Available ports: ['/dev/ttyACM0']
3. Establish Serial Connection
Method 1 (Recommanded)
conection=as2.connect(port='/dev/ttyACM0',baud_rate=9600)
Method 2
conection=as2.connect()
The above code will automaticaly detect the arduino uno board and will have default baud rate 9600
4. Send Data to Arduino
as2.send_data(conection,"Hello Arduino ")
5. Receive Data from Arduino
as2.read_start(connection)
6. Additional Features
- Check Python Version and Detected Ports:
as2.checks()
Contributing
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
License
This library is licensed under the MIT License
Metadata
Release files for arduinoserial2 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| arduinoserial2-1.0.2.tar.gz | 4.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arduinoserial2-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / arduinoserial2-1.0.2.tar.gz
| Download URL | arduinoserial2-1.0.2.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2feb8b6b3bb84ca4f8a21ebc78a41f7f50eee4e2832b8965db0017d6779e4119
|
|
BLAKE2b-256 checksum How to use checksums |
138362cbb6d51127f6fa204bae445134b1725273d2cce814973d3874b4e0f064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / arduinoserial2-1.0.2-py3-none-any.whl
| Download URL | arduinoserial2-1.0.2-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd92d4f68e0d8d01740ca35767d4cee82f12eebe23d03b4bed248796926b1c90
|
|
BLAKE2b-256 checksum How to use checksums |
f4d7168b99a784c16abd2d31c716321945d0b9447fe850870664162559563db7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for arduinoserial2 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.