Giter Site home page Giter Site logo

whirlyhat / geeekpi-zp-0110 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 35 KB

Configure and control the GeeekPi ZP-0110 heatsink with fan for use with Raspberry Pi 4B single board computers (SBC).

Shell 28.45% Python 71.55%
geeekpi raspberry-pi-4 zp-0110

geeekpi-zp-0110's Introduction

GeeekPi-ZP-0110

The project contains scripts to configure and control the GeeekPi ZP-0110 heatsink with fan for use with Raspberry Pi 4B single board computers (SBC).

Automatic fan control is enabled with the raspi-config utility however it ONLY supports the Raspberry Pi OS. For other OS (e.g., Ubuntu) a python script will need to be used to automatically control the fan when the temperature threshold is reached.

Follow the instructions provided by GeeekPi to enable fan control on Raspberry Pi OS. For product details or a sample Python script you can refer to the 52pi.com wiki page at: https://wiki.52pi.com/index.php/ZP-0110

Prerequisites:

Install the Python and i2c packages using the command below:

sudo apt install -y python3-pip python3-dev python3-pil python3-setuptools python3-rpi.gpio i2c-tools

Add the user account to the i2c group.

sudo usermod -aG i2c someacct

Add the Automated Script:

Change to the /opt directory that is used for installing third-party (non-standard) software.

cd /opt

Clone the GeeekPi-ZP-0110 Github repository.

git clone https://www.github.com/WhirlyHat/GeeekPi-ZP-0110.git

Run the deployment script using sudo.

sudo bash ./GeeekPi-ZP-0110/deploy-service.sh

Answer the questions when prompted to continue the installation.

Existing service installation found.
Do you want to overwrite? (Y/n)
y
Creating a new service unit: /etc/systemd/system/pwm-fan-control.service
Successfully created service unit file.
Reloading systemd daemon...
Enabling the service: pwm-fan-control.service
Starting the service: pwm-fan-control.service
Service pwm-fan-control.service successfully enabled and started!

Use systemctl to view the service status.

systemctl status pwm-fan-control

Reboot the system.

sudo reboot now

Customize the Triggers and Polling Interval:

VERSION 2:

Modify the line below in the /service/pwm-fan-control.py python file to specify when the fan turns on/off and how frequently the script checks the temperature. The default values are used if no values are specified for the FanControlService constructor. Note: Temperatures are measured in Celsius by default.

GeeekPi = FanControlService(on_threshold=nn,off_threshold=nn,sleep_interval=ss)

Celsius degrees when the fan turns ON:

on_threshold  = <integer>

Celsius degrees when the fan turns OFF:

off_threshold = <integer>

Seconds to wait until the next core temperature polling:

sleep_interval = <integer>

VERSION 1:

Modify the following three variables in the /service/version_1/pwm-fan-control.py python file to specify when the fan turns on/off and how frequently the script checks the temperature. Note: Temperatures are measured in Celsius by default.

Celsius degrees when the fan turns ON:

ON_THRESHOLD  = <integer>

Celsius degrees when the fan turns OFF:

OFF_THRESHOLD = <integer>

Seconds to wait until the next core temperature polling:

SLEEP_INTERVAL = <integer>

geeekpi-zp-0110's People

Contributors

whirlyhat avatar

Stargazers

 avatar

Watchers

 avatar

geeekpi-zp-0110's Issues

README update for pwm-fan-control v2

Update the README instructions to reflect the use of a class constructor to set and initialize the on_threshold, off_threshold and sleep_interval values.

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.