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.
- Cross-Platform Detection: Detects Arduino and compatible USB-serial boards across macOS, Windows, and Linux.
- 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.
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 Here's a quick guide on how to use the library in your Python project:
pythonCopy code
import arduinoserial2 as as2pythonCopy code
import arduinoserial2 as as2
as2.detect()Available ports: ['/dev/ttyACM0']conection=as2.connect(port='/dev/ttyACM0',baud_rate=9600)conection=as2.connect()as2.send_data(conection,"Hello Arduino ")as2.read_start(connection)- Check Python Version and Detected Ports:
as2.checks()
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
This library is licensed under the MIT License