Skip to main content

A set of functions to control Sequent Microsystems Smart Fan card

Project description

sfan

sfan

This is the python library to control the Smart Fan Card for Raspberry Pi.

Install

~$ sudo apt-get update
~$ sudo apt-get install build-essential python-pip python-dev python-smbus git
~$ git clone https://github.com/SequentMicrosystems/SmartFan-rpi.git
~$ cd SmartFan-rpi/python/
~/SmartFan-rpi/python$ sudo python setup.py install

If you use python3.x :

~$ sudo apt-get update
~$ sudo apt-get install build-essential python3-pip python3-dev python3-smbus git
~$ git clone https://github.com/SequentMicrosystems/SmartFan-rpi.git
~$ cd SmartFan-rpi/python/
~/SmartFan-rpi/python$ sudo python3 setup.py install

Update

~$ cd SmartFan-rpi/
~/SmartFan-rpi$ git pull
~$ cd SmartFan-rpi/python/
~/SmartFan-rpi/python$ sudo python setup.py install

If you use python3.x repace the last line with:

~/SmartFan-rpi/python$ sudo python3 setup.py install

Usage

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

smsfan-1.1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

SMsfan-1.1.2-py2.py3-none-any.whl (4.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file smsfan-1.1.2.tar.gz.

File metadata

  • Download URL: smsfan-1.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6

File hashes

Hashes for smsfan-1.1.2.tar.gz
Algorithm Hash digest
SHA256 0dff246e048ae2e04c2d6da689fdb8941fa313f01bbdd1e8f85a0d7c92b4625f
MD5 f2ef410a28c5552f014960c2604b4b43
BLAKE2b-256 d86544410fb3db83079b4ce0214c69425311e69592d77fca469c4724d6cbe80e

See more details on using hashes here.

File details

Details for the file SMsfan-1.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: SMsfan-1.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6

File hashes

Hashes for SMsfan-1.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1d41d09f5dcdca0cdb4bc25df46f1442c8b71cb4b218a911c7f95d48f628e612
MD5 514f56b1f0046de0fac0a7442b66adff
BLAKE2b-256 7409ac7cf59cd9ef188cf02fb7bf5a53296794b8b212ddcf6907dabd88b0e092

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