Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wkmyws/fan-rs
An I2C Fan Speed Control Program for Raspberry Pi
https://github.com/wkmyws/fan-rs
fan i2c musl raspberry raspberry-pi-4 raspiberry
Last synced: 13 days ago
JSON representation
An I2C Fan Speed Control Program for Raspberry Pi
- Host: GitHub
- URL: https://github.com/wkmyws/fan-rs
- Owner: wkmyws
- Created: 2023-12-16T07:58:37.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-01-01T09:10:14.000Z (11 months ago)
- Last Synced: 2024-10-18T04:38:01.314Z (about 1 month ago)
- Topics: fan, i2c, musl, raspberry, raspberry-pi-4, raspiberry
- Language: Rust
- Homepage:
- Size: 376 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fan-rs
## An I2C Fan Speed Control Program for Raspberry Pi
### Usage
#### One-time Execution
```bash
# Set the Fan Speed to 0 (min/stop)
./fan-rs -s 0
# Set the Fan Speed to 9 (max)
./fan-rs -s 9
# Set the Fan Speed automatically
./fan-rs -a true
# Show CPU Temperature
./fan-rs -t
# Show Help
./fan-rs -h
```![](README/cmd.png)
#### Persistent Execution
```bash
# Enable HTTP service and bind the port to 0.0.0.0:8567
./fan-rs -l --addr="0.0.0.0:8567"
# Set the refresh interval for terminal information (unit: milliseconds).
./fan-rs -l --addr="0.0.0.0:8567" --interval=2000
```> This mode allows controlling the fan speed through both terminal keystrokes and HTTP requests.
>
> `auto mode` is enabled by default, which automatically adjusts the fan speed based on CPU utilization and temperature until the service is stopped.![](README/server.png)
### Build
```bash
cargo build --release --target=aarch64-unknown-linux-musl
```### Overall Architecture
![](README/whole.png)