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
Metadata
Release files for smrtd 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smrtd-1.0.3.tar.gz | 4.0 kB | Without provenance | Details for smrtd-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smrtd-1.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for smrtd-1.0.3-py2.py3-none-any.whl |
Total release size: 8.1 kB
Release files / smrtd-1.0.3.tar.gz
| Download URL | smrtd-1.0.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6935f9216b2073901edf6c204cd3d50b1032952ced1a631521e1d80663c6c740
|
|
BLAKE2b-256 checksum How to use checksums |
dd00b1a6f06d424ec4ebdb1f9d2d6f4684896b71759a782887a3b20bd65853ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.2
|
Release files / smrtd-1.0.3-py2.py3-none-any.whl
| Download URL | smrtd-1.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
38e09b6fba90753120af34c4226d7667a491b4db96f9145c7e5c7831e72b1f5e
|
|
BLAKE2b-256 checksum How to use checksums |
0a0b0037827bbf152317f313c8bc0415a886ec6afaf01240694ddee265c59095
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.2
|
Security for smrtd 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.