Skip to content

haapmik/fan-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fan-controller

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.

Installation

This program depends on wiringOP so please install it first.

git clone https://github.com/orangepi-xunlong/wiringOP.git
cd wiringOP
./build clean
./build

Then build and install this application.

cargo build --release
cp target/release/fan-controller /usr/local/bin

Please see the provided help for how to use the application.

fan-controller --help

Systemd

To 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.service

Check 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.service

Testing

cargo test

About

Fan controller for Orange PI system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages