{"id":18929130,"url":"https://github.com/jwillikers/pwm-fan-controller","last_synced_at":"2025-08-20T11:08:42.783Z","repository":{"id":104839023,"uuid":"489786970","full_name":"jwillikers/PWM-Fan-Controller","owner":"jwillikers","description":"A simple program for controlling a PWM fan from a microcontroller with Rust","archived":false,"fork":false,"pushed_at":"2025-08-12T12:47:09.000Z","size":49204,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-12T14:42:52.417Z","etag":null,"topics":["arm","attiny","attiny85","avr","ch32v203","fan","nostd","pwm","pwm-fan-control","pwm-fan-controller","qt-py","risc-v","rp2040","rust"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwillikers.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.adoc","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-07T21:38:59.000Z","updated_at":"2025-08-12T12:47:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8e631ec-73f4-4894-8c3a-37e790339b94","html_url":"https://github.com/jwillikers/PWM-Fan-Controller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jwillikers/PWM-Fan-Controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2FPWM-Fan-Controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2FPWM-Fan-Controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2FPWM-Fan-Controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2FPWM-Fan-Controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwillikers","download_url":"https://codeload.github.com/jwillikers/PWM-Fan-Controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2FPWM-Fan-Controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271306829,"owners_count":24736770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm","attiny","attiny85","avr","ch32v203","fan","nostd","pwm","pwm-fan-control","pwm-fan-controller","qt-py","risc-v","rp2040","rust"],"created_at":"2024-11-08T11:30:14.006Z","updated_at":"2025-08-20T11:08:42.762Z","avatar_url":"https://github.com/jwillikers.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"= PWM Fan Controller\nJordan Williams \u003cjordan@jwillikers.com\u003e\n:experimental:\n:icons: font\nifdef::env-github[]\n:tip-caption: :bulb:\n:note-caption: :information_source:\n:important-caption: :heavy_exclamation_mark:\n:caution-caption: :fire:\n:warning-caption: :warning:\nendif::[]\n:Asciidoctor-link: https://asciidoctor.org[Asciidoctor]\n:direnv: https://direnv.net/[direnv]\n:Git: https://git-scm.com/[Git]\n:just: https://just.systems/[just]\n:Linux: https://www.linuxfoundation.org/[Linux]\n:nix: https://nixos.org/[Nix]\n:nix-direnv: https://github.com/nix-community/nix-direnv[nix-direnv]\n:Noctua-NF-P12-redux-1700-PWM-Fan: https://noctua.at/en/nf-p12-redux-1700-pwm[Noctua NF-P12 redux-1700 PWM Fan]\n:Rust: https://www.rust-lang.org/[Rust]\n\nimage:https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-attiny85.yaml/badge.svg[ATtiny85 Build, link=https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-attiny85.yaml]\nimage:https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-pico.yaml/badge.svg[Pico Build, link=https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-pico.yaml]\nimage:https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-qt-py-ch32v203.yaml/badge.svg[QT Py CH32V203 Build, link=https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-qt-py-ch32v203.yaml]\n\nPWM fan controller written in {Rust} targeting different microcontrollers.\nCurrently, these are basic examples for setting the {Noctua-NF-P12-redux-1700-PWM-Fan} to a quiescent 40% speed.\nImplementations for specific boards can be found in the `boards` directory.\nThe implementations include boards targeting the Arm, AVR, and RISC-V architectures.\n\nifdef::env-github[]\n++++\n\u003cp align=\"center\"\u003e\n  \u003cimg  alt=\"ATTiny85 PWM Fan Controller Protoboard Top View\" src=\"boards/attiny85/pics/attiny85-pwm-fan-controller-protoboard-top.jpg?raw=true\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg  alt=\"ATTiny85 PWM Fan Controller Breadboard Top View 1\" src=\"boards/attiny85/pics/attiny85-pwm-fan-controller-breadboard-top-1.jpg?raw=true\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg  alt=\"Raspberry PI Pico PWM Fan Controller Breadboard Top View 1\" src=\"boards/pico/pics/pico-pwm-fan-controller-breadboard-top-1.jpg?raw=true\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg  alt=\"QT Py CH32V203 PWM Fan Controller Breadboard Top View 1\" src=\"boards/qt-py-ch32v203/pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-1.jpg?raw=true\"/\u003e\n\u003c/p\u003e\n++++\nendif::[]\n\nifndef::env-github[]\nimage::boards/attiny85/pics/attiny85-pwm-fan-controller-protoboard-top.jpg[ATTiny85 PWM Fan Controller Protoboard Top View, align=center]\nimage::boards/attiny85/pics/attiny85-pwm-fan-controller-breadboard-top-1.jpg[ATTiny85 PWM Fan Controller Breadboard Top View 1, align=center]\nimage::boards/pico/pics/pico-pwm-fan-controller-breadboard-top-1.jpg[Raspberry PI Pico PWM Fan Controller Breadboard Top View 1, align=center]\nimage::boards/qt-py-ch32v203/pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-1.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Top View 1, align=center]\nendif::[]\n\n== Develop\n\n{Nix} is used to manage dependencies, toolchains, and development environments for each board.\nThis makes it possible to develop locally in an environment that is consistent with CI.\nThe `nix develop` command can be used to enter or run commands in an environment with all of the necessary dependencies.\nFor convenience, direnv can be used to automatically load this environment when entering the project's directory.\nThe https://marketplace.visualstudio.com/items?itemName=mkhl.direnv[mkhl.direnv VSCode extension] integrates this environment in VSCode for development.\nNix also generates the configuration for https://pre-commit.com/[pre-commit], which automates formatting and various checks when committing changes.\nFollow the instructions here to set up your development environment.\n\n. Install an implementation of {Nix}, such as https://lix.systems[Lix] used here.\n+\n[,sh]\n----\ncurl -sSf -L https://install.lix.systems/lix | sh -s -- install\n----\n\n. Install direnv for your system according to the https://direnv.net/docs/installation.html[direnv installation instructions].\n+\n[,sh]\n----\nsudo rpm-ostree install direnv\nsudo systemctl reboot\n----\n\n. Integrate direnv with your shell by following the instructions on the https://direnv.net/docs/hook.html[direnv Setup page].\n\n. Clone the repository.\n+\n[,sh]\n----\ngit clone https://github.com/jwillikers/pwm-fan-controller.git\n----\n\n. Permit the direnv configuration for the desired board or boards in the repository.\nThe following command allows loading the environments for all boards.\n+\n[,sh]\n----\ndirenv allow boards/*\n----\n\n. Run `pre-commit install` to configure pre-commit hooks in the repository.\n+\n[,sh]\n----\npre-commit install\n----\n\n. The {just} command runner can be used to perform common tasks, such as building the and flashing the firmware for a particular board.\nThe commands do not automatically use or assume a Nix environment.\nWhen in the directory for a particular board, this shouldn't be a problem as direnv automatically loads the Nix environment.\nHowever, the top-level directory does not load any environment, so use `nix develop` as required to execute the `just commands`.\n+\n[,sh]\n----\nnix develop .#attiny85 --command just flash attiny85\n----\n\n=== Serial Port Permissions\n\nOn Linux, most distributions require the user to be in a particular group to access serial ports.\nHere, I document the particular steps required to permit access to serial ports on Fedora Atomic variants.\n\n. On Fedora Atomic, the _dialout_ group does not exist in the `/etc/group`, so it must be added there.\n+\n[,sh]\n----\necho (getent group dialout) | sudo tee -a /etc/group\n----\n\n. Add the user to the _dialout_ group to access USB without requiring superuser privileges.\n+\n[,sh]\n----\nsudo usermod --append --groups dialout $USER\n----\n\n. Log out and back in for the group change to take effect.\n\n== Boards\n\n* link:boards/attiny85/README.adoc[ATtiny85]\n* link:boards/pico/README.adoc[Raspberry Pi Pico]\n* link:boards/qt-py-ch32v203/README.adoc[Adafruit QT Py CH32V203]\n\n== Contributing\n\nContributions in the form of issues, feedback, and even pull requests are welcome.\nMake sure to adhere to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct].\n\n== Open Source Software\n\nThis project is built on the hard work of countless open source contributors.\nSeveral of these projects are enumerated below.\n\n* {Asciidoctor-link}\n* {direnv}\n* {Git}\n* {Linux}\n* {Nix}\n* {nix-direnv}\n* {Rust}\n\n== Code of Conduct\n\nRefer to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct] for details.\n\n== License\n\nLicensed under either of\n\n* Apache License, Version 2.0 (link:LICENSE-APACHE[LICENSE-APACHE] or https://www.apache.org/licenses/LICENSE-2.0)\n* MIT license (link:LICENSE-MIT[LICENSE-MIT] or https://opensource.org/licenses/MIT)\n\nat your option.\n\n© 2022-2024 Jordan Williams\n\n== Authors\n\nmailto:{email}[{author}]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwillikers%2Fpwm-fan-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwillikers%2Fpwm-fan-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwillikers%2Fpwm-fan-controller/lists"}