Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/steveiliop56/rpi-softwareserial
A simple python library for software serial on raspberry pi.
https://github.com/steveiliop56/rpi-softwareserial
raspberrypi serial software-serial
Last synced: about 2 months ago
JSON representation
A simple python library for software serial on raspberry pi.
- Host: GitHub
- URL: https://github.com/steveiliop56/rpi-softwareserial
- Owner: steveiliop56
- License: gpl-3.0
- Archived: true
- Created: 2024-04-03T17:40:20.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-04-03T17:40:22.000Z (8 months ago)
- Last Synced: 2024-09-23T23:31:02.667Z (about 2 months ago)
- Topics: raspberrypi, serial, software-serial
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Raspberry Pi Python Software Serial
A very simple raspberry pi software serial library made with python and pigpio.
### Installation
The installation is very simple you just need to have pigpio installed which can be installed with this command:
```Bash
sudo apt install python3-pigpio pigpio -y
```After that just copy the library to your project and give the file a name (e.g. `softwareserial.py`).
### Usage
The usage is very simple you just impot it into your script set the parameters and you are ready. Here is an example:
```Python
from softwareserial import softwareSerialserial = softwareSerial(txd_pin=17, rxd_pin=27, baudrate=9600)
serial.write("hello world!")
message = serial.read()
print(message)
```The library uses custom new line and end of line indicators which can be changed like so:
```Python
serial = softwareSerial(txd_pin=17, rxd_pin=27, baudrate=9600, new="/n", eol="/n")
```Furthermore you can change the read timeout like so:
```Python
serial = softwareSerial(txd_pin=17, rxd_pin=27, baudrate=9600, new="/n", eol="/n", timeout=15)
```### License
The project is licensed under the GPL V3 License. You may modify, distribute and copy the code as long as you keep the changes in the source files. Any modifications you make using a compiler must be also licensed under the GPL license and include build and install instructions.