Skip to main content

Real-time serial port plotter/logger.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

live-serial-0.1.4.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

live_serial-0.1.4-py2-none-any.whl (44.7 kB view details)

Uploaded Python 2

File details

Details for the file live-serial-0.1.4.tar.gz.

File metadata

  • Download URL: live-serial-0.1.4.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for live-serial-0.1.4.tar.gz
Algorithm Hash digest
SHA256 de448372dd0eed066449ccde5b8b8409d12c625287f3e9065a470d740d423097
MD5 27d6cdc46557366066d447311d10408e
BLAKE2b-256 ecaaf9f7f8fad9c9d79e64a93bccd5424db51370d685af4e317c034aca2d4979

See more details on using hashes here.

File details

Details for the file live_serial-0.1.4-py2-none-any.whl.

File metadata

File hashes

Hashes for live_serial-0.1.4-py2-none-any.whl
Algorithm Hash digest
SHA256 e2eb133f60e5da356f7a6c4db2a33568f77fcd7d41081c77996b4a6ad3cc1519
MD5 60588f2446038f647210530b962dddcb
BLAKE2b-256 6b600a3ed7becdb3b8181dfc0e25e683d5677248fbb604c693f728fbebd7336d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page