Metadata-Version: 2.4
Name: di2008-python
Version: 1.1.2
Summary: Python Interface for the DATAQ DI-2008 DAQ
Author-email: Clark Hensley <ch3136@msstate.edu>
Maintainer-email: Clark Hensley <ch3136@msstate.edu>
License: MIT License
        
        Copyright (c) 2018 dataq-instruments
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Source, https://github.com/Computational-Mechanics-Materials-Lab/DI2008_Python
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyserial>=3.5
Requires-Dist: tomli; python_version < "3.11"
Dynamic: license-file

# DI2008-Python

## About
Interface for the DI-2008 in Python.

Modified from original interface in Python by DATAQ Instruments under MIT License

Maintainer: Clark Hensley ch3136@msstate.edu

## Getting Started
Install via pip from PyPI:
```sh
pip install di2008-python
```

Instantiate DI2008 Object with Dictionary of Parameters:
```py
from di2008_python import DI2008, DI2008Channels, DI2008Layout, DI2008TCType

# Enable the DI-2008 with a K-Type thermocopule in Analog Channel 1, an N-Type Thermocouple in Analog Channel 3, and the Digital Channel active
di2008 = DI2008({
    <DI-2008 SERIAL NUMBER>: {
        DI2008Channels.CH1: (DI2008Layout.TC, DI2008TCType.K),
        DI2008Channels.CH3: (DI2008Layout.TC, DI2008TCType.N),
        DI2008UseDigital: True,
        }
    },
)
```

This interface uses named enumerations to ensure that what settings are being used is clear and concise

A path to a .toml or .json file can also be passed in, formatted with the same names:
```toml
[<DI-2008 SERIAL NUMBER>]
"DI2008Channels.CH1" = ["DI2008Layout.TC", "DI2008TCType.K"]
"DI2008Channels.CH3" = ["DI2008Layout.TC", "DI2008TCType.N"]
"DI2008UseDigital" = true
```
(Note that toml format will treat the dotted names like DI2008Channels.CH1 as dictionaries, so they must be in quotes. The parser does handle variations in capitalization, spacing, or use of hyphens and underscores)

## Current Features:
* Thermocouples
* ADC Reading
* Digital Reading
* Changing Scan Rate, Decimation, and Filtering Mode
* Automatic ChannelStretch Synchronized Initialization
* Reading configuration from .json/.toml files as well as raw Python dictionaries
* Enforce cleanup on stopping

## Planned Features:
* Changing Packet Rate Size
* Interface with the `info` operator
* CJCDelta
* Rate Measurement
* LED Color
* Specify Digital Input as well as Output

Further information about the DI-2008 can be found on [DATAQ's website](https://www.dataq.com/products/di-2008) and via the [DI-2008 Protocol](https://www.dataq.com/resources/pdfs/misc/di-2008%20protocol.pdf).
