A set of functions to control Sequent Microsystems Smart Fan card
Project description
sfan
This is the python library to control the Smart Fan Card for Raspberry Pi.
Install
For Raspberry Pi 5 only, run the folowing:
sudo pip install SMsfan[rpi5]
or
sudo pip install SMsfan
or
sudo pip3 install SMsfan
Update
sudo pip install SMsfan -U
or
sudo pip3 install SMsfan -U
Now you can import the sfan library and use its functions. To test, read processor temperature from the Smart Fan 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 sfan
>>> sfan.getProcTemp(0)
31
>>>
Functions
setPower(stack, power)
Set the Smart Fan power
stack - stack level, set with jumper [0/1]
power - Fan power [0..100]
getPower(stack)
Return the fan power [0..100]
stack - stack level, set with jumper [0/1]
setSafetyTemp(stack, temp):
Set the Smart Fan safety temperature. If fan processor temperature exceeds this value fan will run 100%
stack - stack level, set with jumper [0/1]
tenp - Safety temperature in degree Celsius [30..80]
getSafetyTemp(stack)
Return the fan safety temperature in degree Celsius [30..80]
stack - stack level, set with jumper [0/1]
getProcTemp(stack)
Return the fan processor temperature in degree Celsius
stack - stack level, set with jumper [0/1]
setLedBlink(stack, blink):
Turn the Smart Fan led blink on or off
stack - stack level, set with jumper [0/1]
blink - Led blinking enable [0/1]
getLedBlink(stack)
Return the fan led blinking [0/1]
stack - stack level, set with jumper [0/1]
setStopInt(stack, seconds)
Set the stop interval in seconds. The fan will run 100% specified seconds then stop.
stack - stack level, set with jumper [0/1]
seconds - how long fan will run [1..65000]
getStopInt(stack)
Return remaining time until fan will stop
stack - stack level, set with jumper [0/1]
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
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 smsfan-1.2.0.tar.gz.
File metadata
- Download URL: smsfan-1.2.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dd271c87c29991dafebfb4eaf2eae2dfa1049e315232dfdeafb7cad0e739988
|
|
| MD5 |
7794ac31b0f75a6c75353fd9b78d0183
|
|
| BLAKE2b-256 |
86f84e9284f14d66d1ef3379aac57547b8f5e21ace7078dc5c29afb4c3f86f88
|
File details
Details for the file smsfan-1.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: smsfan-1.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a9c57c7e2bf74e2c8c62fb0a731ba73c44efd11c8a62d41c98f79b9d7617e8b
|
|
| MD5 |
dfb4780d3af8b62bf8190d5a85694ed6
|
|
| BLAKE2b-256 |
26f80bd1523336013794460e969caac5e13660226d6786c802ee69fb17ec728b
|