Skip to main content

Build Status Coverage Status PyPI

live-serial: real-time serial port plotter/logger

live-serial is a simple package that ties pyserial, matplotlib and csv together to create a real-time plotter and logger of serial port data. This is intended to make life easier for people who work with sensors who need to see real-time feedback when they interact with the sensors.

Quickstart

pip install live-serial

The package includes a script livemon.py that starts the plotting and logging. Although the script is documented internally, the most common use cases are:

livemon.py COM3 -logdir C:\sensordata\

on a Windows machine, and:

livemon.py /dev/ttyACM0 -logdir ~/sensordata

for linux or MacOS. That command will open a live plotting window and log the port data to file simultaneously. To see a full list of examples and command-line arguments, type livemon.py -examples.

Configuration Files

Although the command-line parameters are useful for many quick tasks, repetitive debugging of a multi-sensor serial port setup can be tedious. For these cases, we recommend creating a configuration file (an example is shown in sensors.cfg). This is also a great way to share configuration information with other team members working on the same project: they just need to change the port numbers in the config file for their system.

The documentation on configuration options is at API Documentation.

Running the Unit Tests

To run all the unit tests to make sure that your local setup is working correctly, you will need to have socat installed (for UNIX-based systems), or some virtual COM ports running (for Windows). socat is available via apt-get and brew. For Windows systems, you will need to find a virtual port generator (we have used https://freevirtualserialports.com/ before and it worked fine). On Windows, the COM ports are assigned by the OS, so we can’t label them for you. The scripts expect COM1 and COM3 to be the writeable, virtual ports (attached to COM2 and COM4 respectively). If that is not the case, the unit tests will not work out of the box for you. You can edit tests/conftest.py (~ line 20) and tests/test_multi.py (~ line 15) to use different port numbers.

cd live-serial
tox

API Documentation

Full API documentation is hosted at github pages.

Metadata

Release files for live-serial 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for live-serial 0.1.7
File Size Uploaded
live-serial-0.1.7.tar.gz 31.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for live-serial 0.1.7
File Interpreter ABI Platform
live_serial-0.1.7-py2-none-any.whl Python 2 none any Details

Total release size: 75.7 kB

Release files / live-serial-0.1.7.tar.gz

Download URL live-serial-0.1.7.tar.gz
Size 31.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c77f23c0803b4554de0884579ee6e4efef529061b385a3f89a80b7113bbedad8
BLAKE2b-256 checksum
How to use checksums
7ba0e80d19c83c207cd27b146b1312fd712e459fcac38665176e77d9c614a444
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / live_serial-0.1.7-py2-none-any.whl

Download URL live_serial-0.1.7-py2-none-any.whl
Size 44.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
2f0cf1e611cc14ed5250eba50b28963e832fb54d0ce6ca688f5f07bcc452a8be
BLAKE2b-256 checksum
How to use checksums
45854cbbfcad22f349528b8389c53d1788509742357f0fe9a18e1479f6d3ea6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page