Library to control Sequent Microsystems rtd Card
Project description
librtd
This is the python library to control the RTD Data Acquisition Stackable Card for Raspberry Pi.
Install
sudo pip install SMrtd
Usage
Now you can import the megaio library and use its functions. To test, read relays status from the board with stack level 0:
~$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import librtd
>>> librtd.get(0, 1)
26.654391
>>>
Functions
get(stack, channel)
- stack - stack level of the MEGA-RTD card (selectable from address jumpers [0..7]).
- channel - channel number (id) [1..8].
return tempetature in deg Celsius.
getRes(stack, channel)
- stack - stack level of the MEGA-RTD card (selectable from address jumpers [0..7]).
- channel - channel number (id) [1..8].
return sensor resistance in ohms.
get_poly5(stack: int, channel: int)
Convert RTD reading to Temperature, using 5th order polynomial fit of Temperature as a function of Resistance. This fit provides much-improved accuracy through the temperature range of [-200C, 660C], particularly near the high and low ranges, compared to the default linear fitting function baked into the Sequent RTD Data Acquisition Stackable Card for Raspberry Pi. The coefficients for this fit were developed in a project documented in https://github.com/ewjax/max31865
temp_C = (c5 * res^5) + (c4 * res^4) + (c3 * res^3) + (c2 * res^2) + (c1 * res) + c0
- param stack: 0-7, which hat to read
- param channel: 1-8, which RTD to read on indicated hat
- return: temperature, in Celcius
Tanks to ewjax for the polynomial fit contribution
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smrtd-1.0.3.tar.gz.
File metadata
- Download URL: smrtd-1.0.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6935f9216b2073901edf6c204cd3d50b1032952ced1a631521e1d80663c6c740
|
|
| MD5 |
fc78ef1ca7a088c4abf18aefb3b084cb
|
|
| BLAKE2b-256 |
dd00b1a6f06d424ec4ebdb1f9d2d6f4684896b71759a782887a3b20bd65853ce
|
File details
Details for the file smrtd-1.0.3-py2.py3-none-any.whl.
File metadata
- Download URL: smrtd-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38e09b6fba90753120af34c4226d7667a491b4db96f9145c7e5c7831e72b1f5e
|
|
| MD5 |
5d5385e6fb46bb64d7c6053755645b84
|
|
| BLAKE2b-256 |
0a0b0037827bbf152317f313c8bc0415a886ec6afaf01240694ddee265c59095
|