GithubHelp home page GithubHelp logo

nkh-lab / pyterm Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 120 KB

Python-based serial port terminal

License: GNU General Public License v3.0

Python 100.00%
arduino-serial com-port serialport uart

pyterm's Introduction

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.

CI Status

CI

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 <port> <baudrate> [-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 folder you can find other documentation related to this project and this topic.

pyterm's People

Contributors

nkh-lab avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.