Giter Site home page Giter Site logo

rpi4pwmfan's Introduction

4-wire fan control service for Raspberry Pi 4 using hardware PWM

This code assumes that a 4-wire 5V fan is used, with PWM input (normally blue wire) connected to GPIO12. Tach output (normally yellow wire) is not used.

The code does not depend on any 3rd party libraries to make it easy to install in 'externally managed' python config that Raspberry is using.

To install, first configure the system by adding

dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4

into /boot/firmware/config.txt, then reboot. After that, run

sudo bash install.sh

This will set up a system service that runs the fancontrol.py and takes care of restarting it in case of problems. You can check what the script is doing by using

systemctl status fancontrol

the 'Status: "temperature: 54.3 degC, fan speed 0%"' row is updated every 10 seconds. On startup, the script starts up the fan as audible indication that everything is working as it should.

rpi4pwmfan's People

Contributors

mastmees avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.