Giter Site home page Giter Site logo

wimpysworld / argon1-ubuntu Goto Github PK

View Code? Open in Web Editor NEW
65.0 8.0 11.0 437 KB

Argon 1 Case and Argon Fan HAT controller for Ubuntu

Home Page: https://www.youtube.com/watch?v=b1kG7XUvw5E

Shell 100.00%
raspberry-pi ubuntu argon fan-hat gpio hacktoberfest

argon1-ubuntu's Introduction

Argon Fan Controller
Argon Fan Controller

Argon Fan HAT / Argon ONE Case Fan Controller for Ubuntu

Argon Fan HAT

Made with 💝 for

Introduction

argon1.sh is a refactored version of the Argon FanHAT / Argon ONE Case Fan controller for Ubuntu and is derived from the origin script published by Argon Forty here:

The refactor consisted of:

  • Adds support for Ubuntu by reading temps from sysfs.
  • Adds support for Ubuntu 20.04 by only using Python 3.
  • Uses here documents to make the script easier to read/maintain.
  • Simplifies install/uninstall via an option parser.
  • Removes the config script and desktop icons.

We have a Discord for this project: Discord

Raspberry Pi Argon Fan HAT & Argon ONE Case Fan controller for Ubuntu

Installation

This script will only work on Ubuntu running on a Raspberry Pi.

  • Clone the project
    • git clone https://github.com/wimpysworld/argon1-ubuntu.git
  • Install the fan controller
    • cd argon1-ubuntu
    • sudo ./argon1-ubuntu --install

Usage

Usage
  $0 [options]

Available options are
  --config      Get help about how to configure the fan
  --install     Install the Argon ONE Case Fan / Argon FanHAT driver
  --uninstall   Uninstall the Argon ONE Case Fan / Argon FanHAT driver

To modify you fan curve edit /etc/argononed.conf and then execute sudo systemctl restart argononed.service to made the changes active.

Argon ONE Pi 4 Power Button Functions

Power State Action Function
OFF Short Press Turn ON
ON Long Press (>=3s) Soft Shutdown and Power Cut
ON Short Press (<=3s) Nothing
ON Double Tap Reboot
ON Long Press (>=5s) Forced Shutdown

Argon Fan HAT Power Button Functions

Power State Action Function
OFF Short Press Nothing
ON Long Press (>=3s) Soft Shutdown and Power Cut
ON Short Press (<=3s) Nothing
ON Double Tap Reboot
ON Long Press (>=5s) Forced Shutdown

Credits

TODO

  • Confirm Argon Fan HAT works on Pi 2, 3 and 4.
  • Replace use of os.system().
  • Clean up parsing of the config file.

DONE

  • Read /sys/class/thermal/thermal_zone0/temp in a Pythonic way.

argon1-ubuntu's People

Contributors

flexiondotorg avatar tssva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

argon1-ubuntu's Issues

Test for no argument? - fixed?

Hi,
I installed the beta Mate desktop on my Pi3B+ yesterday and also this script as the Pi's in an Argon 1 case. If I run the script without supplying an argument it displays the msg on line 18 and then exits, its been many years since I tangled with case statements but it looks like noarg is not detected, maybe it could just call usage?
Cheers
Tony

Shutdown via OS menu not working with script?

I have the argon for ubuntu script installed on my pi4 8gb model running Ubuntu MATE 20.04. The fans and power buttons function as expected and the same as they do when using my Raspberry OS 64 image except when doing a shutdown. When selecting shutdown from the menu in Ubuntu the system will power off, but the red status light will not turn off. The board does not seem to register the system in an off state. The system will not respond to the power button at this point and will not turn on. Unplugging the power is the only way to reset the system and allow the power button to function and turn the system back on.

Under Raspberry OS 64 selecting the shutdown option within the OS will shut down the Pi4 and the red light will turn off. Pressing the power button on the case will then turn the system back on as expected.

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.