Skip to main content

A command line tool continuously send data to a serial port to simulate weighbridge communicating.

Project description

weighbridge-simulator

license status build version python

A command line tool continuously send data to a serial port to simulate weighbridge communicating.

Install

You can install this tool by the following methods:

  1. Install weighbridge-simulator by pip:

    pip install git+ssh://git@github.com/garrett-he/weighbridge-simulator.git
    
  2. Download compiled binary files from Repository Releases.

Quickstart

  1. Prepare a file contains weight list in format:

    000.000
    000.020
    000.160
    000.420
    000.780
    005.660
    005.800
    006.040
    006.120
    006.100
    006.080
    ...
    
  2. Run wb-simulator to start simulation:

    wb-simulator --data-file FILE
    

Then you can receive the weight values from the created port /dev/pts/N in * raw* data format.

weighbridge-simulator will convert the input data into raw weighbridge format before sending it to a serial port, like:

012.345 will be converted to 543.210=

Usage

Usage: wb-simulator [OPTIONS]

  A command line tool continuously send data to a serial port to simulate
  weighbridge communicating.

Options:
  -p, --port NAME       Name of serial port.
  -d, --data-file PATH  Path of data file.  [required]
  -l, --loops N         Loops of sending data set, zero means endless.
  -i, --interval SECS   Interval of each data.
  --version             Show the version and exit.
  --help                Show this message and exit.

License

Copyright (C) 2023 Garrett HE garrett.he@hotmail.com

The BSD 3-Clause License, see LICENSE.

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

weighbridge_simulator-0.3.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

weighbridge_simulator-0.3.1-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

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