author

kwisher

Inbox View Profile
13Comments

Tell us about yourself!

  • Error after changing to gpio25:kevin@pi-04:~ $ sudo ./fan3.sh [sudo] password for kevin: cat: /sys/class/gpio/gpio25/value: No such file or directorysh: echo: I/O error./fan3.sh: 12: ./fan3.sh: cannot create /sys/class/gpio/gpio25/direction: Directory nonexistent./fan3.sh: 16: [: -eq: unexpected operator

    When manually running your bash script I get the following error:root@pi-04:/home/kevin# ./fan3.sh cat: /sys/class/gpio/gpio2/value: No such file or directory./fan3.sh: 12: ./fan3.sh: cannot create /sys/class/gpio/gpio25/direction: Directory nonexistent./fan3.sh: 20: [: -eq: unexpected operator

    View Instructable »
  • kevin@pi-04:~ $ sudo python3 /home/kevin/fan2.py[sudo] password for kevin: 45.1 @ 2019-05-30 07:25:47.387085Fan is Off...Starting Fan45.1 @ 2019-05-30 07:25:47.401777Fan is ON44.0 @ 2019-05-30 07:25:52.434532Fan is ON44.0 @ 2019-05-30 07:25:57.530827Fan is ON44.0 @ 2019-05-30 07:26:03.026025Fan is ON44.0 @ 2019-05-30 07:26:12.612085Fan is ON39.7 @ 2019-05-30 07:28:15.305166Fan is on...Shuting it Down

    I've adjusted the high & low limits to suit my garage environment and have manually used the temp bash script to check on the temps so that I would know when the fan should be powered on or off. I will disable cron as you asked for some testing and reply back.

    Manual test worked!!! Not sure why cron is causing issues. Maybe a systemd service or timer would work better?

    View Instructable »
  • New script will power on fan once high limit is reached but will not power off fan once lower limit is reached. Now I can manually power fan off which wasn't working with the previous version.

    Log output:Fan is on, script must be running from another instance...Since there are no date/time in log out put, I'm goingby file date/time.

    View Instructable »
  • I'm not having any luck with your script. I can't even manually turn the fan on from cli. Running on a Pi-3 using GPIO-6, code has been changed to reflect the correct pin. Not sure where to start troubloeshooting.

    I'm using physical pin 22 which is BCM 25. I've got it all sorted out now and the script is now working.

    Line from root cron:*/15 * * * * /usr/bin/python3 /home/kevin/fan.py > /home/kevin/fanLog.txtOutput from log file:Fan is on, script must be running from another instance...

    Like I said earlier, I'm using physical pin 22 which is BCM 25. I can turn the fan on/off using gpio commands and sudo python3 fan.py on/off. Problem is the script is not running with cron even though i added it to root's cron.

    View Instructable »
  • Hello, thanks for your Instructable. I found 2 errors in your script noted below:print("Turning fan on") << your forgot parenthesis Line 73print("Turning fan off") << same on Line 76

    View Instructable »