Giter Site home page Giter Site logo

deskpi_v1's People

Contributors

mbentley avatar yoyojacky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

deskpi_v1's Issues

DeskPi Lite - Please implement PWN fan control service as well as / instead of limited Raspberry Pi OS functionality.

@yoyojacky Hi, it would be very simple for you to implement a PWM fan control service for the Pi4 with respect to the DeskPi Lite case - this case hardware uses direct GPIO header connections for the included PWM capable fan. Like in your bigger DeskPi case software, you could easily change from a /dev/ttyUSB0 to a GPIO PWM fan control service.

For anyone else wanting to implement some form of PWM fan control, please see the included python3 script code below. This will enable: -

< 40'c       - Fan 75%, for a minimum of 60sec
40'c to 45'c - Fan 85%, for a minimum of 120sec
> 45'c       - Fan 100%, for a minimum of 180sec

In everyday use, this script offers good temperatrue control, with the CPU temp rarely reaches > 45'c and general fan noise is very low and still keeps good control via the PWM fan vs standard Raspberry Pi OS PWM fan control via /boot/config.txt or raspi-config.

 #!/usr/bin/python3

import RPi.GPIO as GPIO
import time
import subprocess

GPIO.setmode(GPIO.BCM)
GPIO.setup(14, GPIO.OUT)
pwm = GPIO.PWM(14,100)

print("\nPress Ctrl+C to quit \n")
dc = 0
pwm.start(dc)

try:
    while True:
        temp = subprocess.getoutput("vcgencmd measure_temp|sed 's/[^0-9.]//g'")
        if round(float(temp)) >= 45:
            dc = 100
            pwm.ChangeDutyCycle(dc)
            print("CPU Temp:",float(temp)," Fan duty cycle:",dc)
            time.sleep(180.0)
        if round(float(temp)) >= 40:
            dc = 85
            pwm.ChangeDutyCycle(dc)
            print("CPU Temp:",float(temp)," Fan duty cycle:",dc)
            time.sleep(120.0)
        else:
            dc = 70
            pwm.ChangeDutyCycle(dc)
            print("CPU Temp:",float(temp)," Fan duty cycle:",dc)
            time.sleep(60.00)

except KeyboardInterrupt:
    pwm.stop()
    GPIO.cleanup()
    print("Ctrl + C pressed -- Ending program")

Power to Raspberry Pi does not cut off on shutdown - RetroPie 4.8

Greetings,

When the system is shutdown from terminal or EmulationStation, on Retropie, the adapter board does not cut power off to the Raspberry Pi.

If i double click the power button, the adapter board does issue a shutdown command to the Pi and cuts power after shutdown.

There were no errors when installing via install.sh script.

Thank you. Best regards

does not work on RetroPie

I have a desk pi lite
i installed this and the only way i get the power button to work right i have to have the swtich set to D and that just kills the power. not a safes hut down, but after looking at what happens when it installs

/install.sh: line 6: cd: /root/deskpi_v1/: No such file or directory
[info] Enable dwc2 on Host Mode.
[info] dwc2 has been setting up successfully.
[info] DeskPi v1 safe-cut-off-power after system halt daemon.
./install.sh: line 26: cd: /root/deskpi_v1/drivers/c/: No such file or directory
cp: cannot stat '/root/deskpi_v1/drivers/c/safecutoffpower': No such file or directory
chmod: cannot access '/usr/bin/safecutoffpower': No such file or directory
[info] DeskPi V1 Service configuration finished..
[info] DeskPi V1 Service Load module..
Created symlink /etc/systemd/system/halt.target.wants/deskpi_v1-safecutoffpower.service → /lib/systemd/system/deskpi_v1-safecutoffpower.service.
Created symlink /etc/systemd/system/shutdown.target.wants/deskpi_v1-safecutoffpower.service → /lib/systemd/system/deskpi_v1-safecutoffpower.service.
Created symlink /etc/systemd/system/poweroff.target.wants/deskpi_v1-safecutoffpower.service → /lib/systemd/system/deskpi_v1-safecutoffpower.service.
[ ok ] DeskPi V1 Driver installation finished successfully..
[info] System will reboot in 5 seconds to take effect..

it fails when trying to do whatever in the root dir
so i guessing thats the issue.

any pointers on how to fix this?

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.