Skip to main content

This is a python interface to the SMARTChem Ion3 ion-selective electrode instrument.

It requires the device to be connected to the host computer using a RS232 style serial port, such as through a USB-to-serial converter, and then provides a basic wrapper around the device’s control capabilities. See the device’s user manual for details on its capabilities.

Source code at https://gitlab.com/ptapping/smartchem-ion3.

Documentation online at https://smartchem-ion3.readthedocs.io/.

Basic Usage

import smartchem_ion3

# Make a function to pretty print data obtained from the device
def handle_data(d):
    """Handle receipt of spontaneous data sent from the instrument."""
    print(f"Reading #{d.n} at {d.timestamp.isoformat()}")
    print(f"  Channel 1, {d.ch1.unit.description} = {d.ch1.value}{d.ch1.unit.suffix}")
    print(f"  Channel 2, {d.ch2.unit.description} = {d.ch2.value}{d.ch2.unit.suffix}")
    print(f"  Channel 3, {d.ch3.unit.description} = {d.ch3.value}{d.ch3.unit.suffix}")
    print(f"  Temperature, {d.cht.unit.description} = {d.cht.value}{d.cht.unit.suffix}")

# With no parameters, will use the first detected serial port at 38400 baud.
ion3 = smartchem_ion3.Ion3()

# Get a reading of the current state of the data channels and print it out
handle_data(ion3.current_data())

# Get the logged data and print them out
for d in ion3.logged_data():
  handle_data(d)

Download files

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

Source Distribution

smartchem_ion3-1.0.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smartchem_ion3-1.0.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file smartchem_ion3-1.0.0.tar.gz.

File metadata

  • Download URL: smartchem_ion3-1.0.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for smartchem_ion3-1.0.0.tar.gz
Algorithm Hash digest
SHA256 02918f6b9efaad570f20088b21d8dd79f22ebfe435d00c060ca9bd33340ef61f
MD5 9327f64bfe638772e417238330436dde
BLAKE2b-256 9b2bcd43a7117dec27145ef951248fbaaccc52e0bf17032240c53426e23e9afe

See more details on using hashes here.

File details

Details for the file smartchem_ion3-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: smartchem_ion3-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for smartchem_ion3-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3e592550dc93dfb57ebfb9ffe40e5037983206fb1deb688433d7d8f054a3162
MD5 207feee10c46e766a1b6ad15c34285d9
BLAKE2b-256 d55db95d0ccdb39bc28fe5ae531ef42c8f07c3d44fb861d9f48a254765af9450

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page