Skip to main content

Library to control smtc Automation Card

Project description

sm_tc

This is the python library to control the Eight Thermocouples DAQ 8-Layer Stackable HAT for Raspberry Pi.

Install

sudo pip install SMtc

Usage

~$ python
Python 3.10.7 (main, Nov  7 2022, 22:59:03) [GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sm_tc
>>> tc = sm_tc.SMtc(0)
>>> tc.get_temp(1)
26.5
>>>

More usage example in the examples folder

Functions prototype

class sm_tc.SMtc(stack = 0, i2c = 1)

  • Description
    • Init the SMtc object and check the card presence
  • Parameters
    • stack : Card stack level [0..7] set by the jumpers
    • i2c : I2C port number, 1 - Raspberry default , 7 - rock pi 4, etc.
  • Returns
    • card object

set_sensor_type(channel, val)

  • Description
    • Set one channel thermocouple input type
  • Parameters
    • channel: The input channel number 1 to 8
    • val: The thermocouple type [0..7] -> [B, E, J, K, N, R, S, T]
  • Returns
    • none

get_sensor_type(channel)

  • Description
    • Get one channel thermocouple input type
  • Parameters
    • channel: The input channel number 1 to 8
  • Returns
    • The thermocouple type [0..7] -> [B, E, J, K, N, R, S, T]

print_sensor_type(channel)

  • Description
    • Print one channel thermocouple input type [B, E, J, K, N, R, S, T]
  • Parameters
    • channel: The input channel number 1 to 8
  • Returns
    • none

get_temp(channel)

  • Description
    • Get one channel measured temperature in degee Celsious
  • Parameters
    • channel: The input channel number 1 to 8
  • Returns
    • Temperature in degree Celsious

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

smtc-1.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

smtc-1.0.1-py2.py3-none-any.whl (3.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file smtc-1.0.1.tar.gz.

File metadata

  • Download URL: smtc-1.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for smtc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6941eb032a024e8d936ff7c7997aff60b3e80196c750eb64d51f0cc595bfa8a3
MD5 6dff0c6dbb9af4beb53991a7a538b471
BLAKE2b-256 edce2d7f6b01d661b85454744530279a82ddad7d5c5f49c8880dbe2465f1f6d2

See more details on using hashes here.

File details

Details for the file smtc-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: smtc-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for smtc-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 32dc68438291c2985e73d94269dfe6625616385880f1414c5fd4bc608962374f
MD5 7d30933deeb667592afa794fb02f6f03
BLAKE2b-256 8a4b916ddc2670cbc45eb455a50255c21776807a38e7466fbab587df116db471

See more details on using hashes here.

Supported by

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