PWM fan controller for Orange PI boards made with Rust.
This was just a small personal project to learn Rust programming language and to have a fan controller for my board.
This program depends on wiringOP so please install it first.
git clone https://github.com/orangepi-xunlong/wiringOP.git
cd wiringOP
./build clean
./buildThen build and install this application.
cargo build --release
cp target/release/fan-controller /usr/local/binPlease see the provided help for how to use the application.
fan-controller --helpTo use this as a service with systemd enabled systems, please follow steps shown below.
fan-controller --gpio-pwn 3 --print-systemd > /etc/systemd/system/fan-controller.service
systemctl daemon-reload
systemctl start fan-controller.serviceCheck from logs that the service actually works as you intended it to work.
journalctl -u fan-controller.service --since="5 minutes ago"Then enable the service to run during system startup.
systemctl enable fan-controller.servicecargo test