Welcome to SM16uout’s documentation!
Install
sudo pip install SM16uout
or
sudo pip3 install SM16uout
Update
sudo pip install SM16uout -U
or
sudo pip3 install SM16uout -U
Initiate class
$ python
Python 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import SM16uout.SM16uout as m
>>> SM16uout = m()
>>>
Documentation
class SM16uout.SM16uout(stack=0, i2c=1)
Bases: object
Python class to control the Sixteen 0-10V Analog Outputs
- Parameters:
- stack (int) – Stack level/device number.
- i2c (int) – i2c bus number
calib_status()
Get current calibration status of device.
- Returns: (int) Calib status
get_version()
Get firmware version.
Returns: (int) Firmware version number
get_u_out(channel)
Get 0-10V output channel value in volts.
- Parameters: channel (int) – Channel number
- Returns: (float) 0-10V output value
set_u_out(channel, value)
Set 0-10V output channel value in volts.
- Parameters:
- channel (int) – Channel number
- value (float) – Voltage value
cal_u_out(channel, value)
Calibrate 0-10V output channel. Calibration must be done in 2 points at min 5V apart.
- Parameters:
- channel (int) – Channel number
- value (float) – Real(measured) voltage value
get_led(led)
Get led state.
- Parameters: led (int) – Led number
- Returns: 0(OFF) or 1(ON)
get_all_leds()
Get all leds state as bitmask.
- Returns: (int) Leds state bitmask
set_led(led, val)
Set led state.
- Parameters:
- led (int) – Led number
- val – 0(OFF) or 1(ON)
set_all_leds(val)
Set all leds states as bitmask.
- Parameters: val (int) – Led bitmask
get_rs485()
NOT IMPLEMENTED
set_rs485(modbus, modbusId, baudrate=38400, stopbits=1, parity=0)
Set the RS485 port parameters
- Parameters:
- modbus (0/1) – 1: turn ON, 2: turn OFF
- modbusId (1..254) – modbus ID
- baudrate (1200..115200) – baud rate (default: 38400)
- stopbits (1/2) – stop bits (default: 1)
- parity (0/1/2) – stop bits (default: 0 - None)
disable_rs485()
Disable modbus and free the RS485 for Raspberry usage
wdt_reload()
Reload watchdog.
wdt_get_period()
Get watchdog period in seconds.
- Returns: (int) Watchdog period in seconds
wdt_set_period(period)
Set watchdog period.
- Parameters: period (int) – Channel number
wdt_get_init_period()
Get watchdog initial period.
- Returns: (int) Initial watchdog period in seconds
wdt_set_init_period(period)
Set watchdog initial period.
- Parameters: period (int) – Initial period in second
wdt_get_off_period()
Get watchdog off period in seconds.
- Returns: (int) Watchfog off period in seconds.
wdt_set_off_period(period)
Set off period in seconds
- Parameters: period (int) – Off period in seconds
wdt_get_reset_count()
Get watchdog reset count.
- Returns: (int) Watchdog reset count
wdt_clear_reset_count()
Clear watchdog counter.
get_button()
Get button status.
- Returns: (bool) status : True(ON)/False(OFF)
get_button_latch()
Get button latch status.
- Returns: (bool) status : True(ON)/False(OFF)
Metadata
Release files for sm16uout 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 |
|---|---|---|---|---|
| sm16uout-1.0.3.tar.gz | 6.4 kB | Without provenance | Details for sm16uout-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sm16uout-1.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for sm16uout-1.0.3-py2.py3-none-any.whl |
Total release size: 12.1 kB
Release files / sm16uout-1.0.3.tar.gz
| Download URL | sm16uout-1.0.3.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd58709da9311f3b47c262e129fd4432d4fe9c6ac1f070b4d07cb64d049211ba
|
|
BLAKE2b-256 checksum How to use checksums |
fef5384f6bb66199afe5565b902303824ad42faf8cc722f3955ff7b432442da3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Release files / sm16uout-1.0.3-py2.py3-none-any.whl
| Download URL | sm16uout-1.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
36bde4c0fffe00f5c29963308d4c7d2d21bfd8235e60010924e992f00125c661
|
|
BLAKE2b-256 checksum How to use checksums |
1eaaf774579a7820ca713965b3fa5cf2e38bc2fb20d071e327ccb19b9b0c4dde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Security for sm16uout 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.