Skip to main content

Python Package to interface with Radio Shack's 2200087 Multimeter

Project description

This is a Python Package to interface with Radio Shack’s 2200087 Multimeter.

The 2200087 is an inexpensive DMM which supports logging and graphing data on a computer, but the supplied code only supports Windows. This is a python package to allow for connecting to the multimeter over USB on Linux or Mac OSX. Due to radioshack not supplying any serial specifications, the protocol was reverse engineered by David Dworken from simply observing the output of the DMM.

The serialDecoder module and the serial protocol documentation is essentially a slightly tweaked version of the script written and maintained by David Dworken, available at https://github.com/ddworken/2200087-Serial-Protocol.git

This package includes a version of the serialDecoder module, slightly refactored to allow it to be imported into other python scripts. It also includes a runner module which contains a Twisted protocol, wrapped by Crochet. This module should be relatively easier to include into other python scripts and applications.

Installation

This package has been tested only with python 2.7.

This package can be installed from pypi using pip:

$ pip install driver2200087

Or using easy_install (python 2.7 only):

$ easy_install driver2200087

Usage

Standalone usage is listed in the documentation, and should be fairly straightforward to follow.

The serialDecoder module can also be imported and used from within a python script, and the documentation can help you use it in that manner.

The recommended way for using the package, though, is through the runner module which it provides. The simpler form of use is to get the latest available value whenever necessary. A short example of how this can be done using this package in a typical python application would be

from driver2200087 import runner

dmm = runner.InstInterface2200087()
dmm.connect()

# Other Application code
# ...
#
# And when the measurement is required :

if dmm.data_available() > 0:
    print dmm.latest_point()
else:
    raise Exception # Or pass, or retry, as per application requirements

# other application code
# ...

If the application calls for continuous recording of the data, the following is likely a better approach

from driver2200087 import runner

dmm = runner.InstInterface2200087()
dmm.connect()
while True:
    if dmm.data_available() > 0:
        print dmm.next_point()

Note that in this code snippet, the python interpreter is blocked by the infinite while loop. This is not required by the module. As long as dmm.next_point() is called often enough (10 Hz), you can use whatever mechanism you like to actually make the call. Note that dmm.data_available() must be checked by your application before making the call, or you should trap the exception that results.

Making the call at less than this frequency will cause data points to be lost when the point buffer fills up - if your application only calls for the occasional measurement, you’re probably better off with dmm.latest_point() instead.

Downloads and Documentation

The simplest way to obtain the source for this package is to clone the git repository:

git clone https://github.com/chintal/driver2200087.git driver2200087

You can install it as usual, with:

python setup.py install

The latest version of the documentation can be found at ReadTheDocs.

License

driver2200087 is distributed under the GPLv2 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

driver2200087-0.4.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

driver2200087-0.4-py2.7.egg (25.4 kB view details)

Uploaded Source

File details

Details for the file driver2200087-0.4.tar.gz.

File metadata

  • Download URL: driver2200087-0.4.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for driver2200087-0.4.tar.gz
Algorithm Hash digest
SHA256 2e42c6f672f43acbb59c7dbeceb5ef4b74015b7fb021e6fa1e6f07b99cfa6164
MD5 3eccba98c0708c4533385ae52755a6e0
BLAKE2b-256 0166742dd3d039593a42dc07e1bd6433d8ba41356bc70ba39372f134849c1fde

See more details on using hashes here.

File details

Details for the file driver2200087-0.4-py2.7.egg.

File metadata

File hashes

Hashes for driver2200087-0.4-py2.7.egg
Algorithm Hash digest
SHA256 406131f466692d9c003b1512dc9903aabf01eb11a62fe447f0840f84f39bbd4c
MD5 9e07dd2296ff837580a46ffca87d4175
BLAKE2b-256 9e9e31c083294a34e02ecdb8f538e66966e2c18dccf4a418865c0a6b6106850b

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