Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Eraden committed Apr 2, 2021
0 parents commit 6ec4768
Show file tree
Hide file tree
Showing 8 changed files with 612 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
323 changes: 323 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "argonfand"
version = "0.1.0"
authors = ["Adrian Woźniak <adrian.wozniak.1986@gmail.com>"]
edition = "2018"

[dependencies]
rppal = { version = "0.11.3" }
gpio = { version = "0.4.1" }
tokio = { version = "1.4.0", features = ["full"] }
gumdrop = "0.8.0"
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ArgonOne Fan Service

ArgonOne case for Raspberry Pi 4B fan service.

```bash
./build.sh
sudo argonfand -g
sudo argonfand -f 100 # enforce max speed and exit
sudo argonfand # start service
```

### Service

```bash
systemctl status argonfand.service
systemctl start argonfand.service
systemctl enable argonfand.service
```
10 changes: 10 additions & 0 deletions argonfand.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Argon One Fan and Button Service
After=multi-user.target
[Service]
Type=simple
Restart=always
RemainAfterExit=true
ExecStart=/usr/bin/argonfand
[Install]
WantedBy=multi-user.target
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cargo build --release
strip ./target/release/argonfand
sudo cp ./target/release/argonfand /usr/bin
sudo cp ./argonfand.service /usr/lib/systemd/system/argonfand.service
Loading

0 comments on commit 6ec4768

Please sign in to comment.