Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nkh-lab/pyterm
Python-based serial port terminal
https://github.com/nkh-lab/pyterm
arduino-serial com-port serialport uart
Last synced: 4 days ago
JSON representation
Python-based serial port terminal
- Host: GitHub
- URL: https://github.com/nkh-lab/pyterm
- Owner: nkh-lab
- License: gpl-3.0
- Created: 2024-07-15T18:09:13.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-08-02T15:58:55.000Z (4 months ago)
- Last Synced: 2024-08-02T17:46:41.639Z (4 months ago)
- Topics: arduino-serial, com-port, serialport, uart
- Language: Python
- Homepage:
- Size: 117 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Intro
This project is a Python-based serial port terminal designed with a simple and user-friendly interface. It's easy to use for various DIY projects, such as communicating with an Arduino or other microcontroller via the serial port.![](doc/screenshots/pyterm-arduino.png)
## CI Status
[![CI](https://github.com/nkh-lab/pyterm/actions/workflows/ci.yml/badge.svg)](https://github.com/nkh-lab/pyterm/actions/workflows/ci.yml)## How It Works
After running the terminal, it starts listening to the specified serial port for incoming data. When the user begins typing, the terminal temporarily pauses listening. Upon pressing Enter, the typed data is sent to the connected device, and the terminal resumes listening to the port for any new messages. This allows for seamless communication between the terminal and the connected device.## Prerequisites
```
pip install serial
```
Or for Ubuntu:
```
sudo apt install python3-serial
```## Usage and Input Arguments
If you run the script without any arguments passed, you will see a usage hint:
```
./pyterm.py
Usage: ./pyterm.py [-h]
```
Passing the -h flag enables hexadecimal mode, which means you can send raw bytes, otherwise text mode will be used.## Examples of usage
Text mode:
```
./pyterm.py /dev/pts/13 9600
Connected to /dev/pts/13 at 9600 baudrate. Use Ctrl+C to exit.
Hello World from pyterm!
```Hex mode:
```
./pyterm.py /dev/pts/13 9600 -h
Connected to /dev/pts/13 at 9600 baudrate. Use Ctrl+C to exit.
0102030405060708090a0b0c0d0e0f
```## Other documentation
In the [doc](./doc) folder you can find other documentation related to this project and this topic.