Software installation and configuration
Strato Pi Fan can be used with any operating system, programming language or
framework compatible with Raspberry Pi.
All the features are controlled via standard I
2
C communication on the primary I
2
C bus
(i2c-1).
Our Strato Pi Fan kernel module for the Raspberry Pi OS (formerly Raspbian) provides for
easy usage via sysfs files, without the need to implement the underlying I
2
C protocol.
For usage on other operating systems or to avoid the kernel module installation, refer to
the "I
2
C Control" paragraph in the next chapter.
Raspberry Pi OS kernel module
The Strato Pi Fan kernel module can be used to easily access Strato Pi Fan's features via
sysfs file system.
Refer to the following instructions to download and install the module or go to:
https://github.com/sfera-labs/strato-pi-fan-kernel-module
for updated instructions and further details and examples.
Download and install:
$
sudo apt install git raspberrypi-kernel-headers
$
git clone --depth 1 https://github.com/sfera-labs/strato-pi-fan-kernel-module.git
$
cd strato-pi-fan-kernel-module
$
make
$
sudo make install
$
dtc -@ -Hepapr -I dts -O dtb -o stratopifan.dtbo stratopifan.dts
$
sudo cp stratopifan.dtbo /boot/overlays/
Add the following line to /boot/config.txt:
dtoverlay=stratopifan
Optionally, to be able to use the
sysfs
files not as super user, create a new group
"stratopifan" and set it as the module owner group by adding an udev rule:
$
sudo groupadd stratopifan
$
sudo cp 99-stratopifan.rules /etc/udev/rules.d/
and add your user to the group, e.g., for user "pi":
$
sudo usermod -a -G stratopifan pi
Reboot:
$
sudo reboot
After installation, you'll find the directory
/sys/class/stratopifan/
which gives you access to
Strato Pi Fan's functionalities.
Refer to the next chapter for usage details.
9
Strato Pi Fan User Guide