Posts by Mario77

    If I want just to start rpi only do I need to add the dtoverlay=gpio-shutdown to config.txt. and 1 maybe stupid question - where is this config.txt file on pri4

    To power up, all that’s required is to connect physical pin 5 (BCM 3) to the ground next to it. This functionality is enabled by default.

    To shut down with the same button, just add the line dtoverlay=gpio-shutdown to /flash/config.txt

    config.txt is read only

    to edit ssh

    Code
    mount -o remount,rw /flash

    then to make it read only again

    Code
    mount -o remount,ro /flash

    True for the reboot and shutdown. In fact I am using the Kodi app on the phone as a remote control but for the activation I can not use it

    So you said just shorting pin 5 and 6 will start rpi( you mean GPIO3 and GND)??? Directly shorting them with nothing else?

    Yeah thats what I mean gpio3 and the gnd across it...you add dtoverlay=gpio-shutdown to config.txt..

    Mario77, Da Flex,

    Your explanations are very useful. I was thinking to implement such a button on my Pi4 BUT I was thinking... What if the power button is with IR for the regular TV or Bluetooth from the phone. Is this possible to be done? I think this will be just a bit better for usage

    Thanks again for your explanations!

    That will be usefull just for startup if it works...basically reboot and shut down are the same as the ones you r using now from Kodi power menu..so you can set the remote buttons even without switch..

    Just a quick idea is a transistor between pin 5 and 6 and an ir receiver connected to it...basically if you short pin 5 and 6 rpi will start.

    Thank you!


    speed steps in script are low so you dont see much difference by looking at the fan

    Code
    tempSteps = [30, 35, 40, 45, 50, 55, 60, 65, 70, 75]  # [°C]
    speedSteps = [0, 35, 45, 50, 55, 60, 70, 80, 90, 100]  # [%]

    try to change the steps and you ll see a big jump from 50% to 100%

    something like:

    Code
    tempSteps = [45, 50]  # [°C]
    speedSteps = [50, 100]  # [%]

    This way it jumps from 50% straight to full throttle

    How can I verify that the speed fan is temperature controlled? I am looking at it and speed seems the same all the time

    Post #74 I posted a small script calibrate.py

    That is similar script to the one on #60 but works manually from terminal instead of reading temperatures...it's just for testing and to find your fan minimum speed...mine started at 30%...less then that and it wont turn...

    You can test fan with that script from terminal....you type 50 will be 50% speed..100 will be 100% speed and so on...

    Did you connect transistor base to the proper gpio?

    I have a great request:

    Can you sum up 1 working solutions with all the steps needed in your first post as the topic is interesting but it is going longer and longer.

    The topic is growing and in 1 part we have scripts, update in another, after there is script with variable speed and for me it is a bit confusing

    Thanks in advance!

    What are you planning to do?

    2 pin 5v fan ?

    Script in post #60 works fine for PWM temp/speed control..

    You just need to make circuit..

    Well although power button works as intended..unfortunately it doesn't work if system is for some reason frozen..so it might still need a dirty power shutdown once in a while..

    Led On - Start - Quick Press Restart - Long Press Shutdown

    Da Flex

    Just been to the local shop to get the switch.

    So after some research managed to get it sorted..

    Led,Start,Restart and Shutdown all in one..

    short press is restart..long press is shutdown..press from off will switch on..

    Now gonna test it for a few days...happy to share script if anyone wanna test..

    If you connect the card to a PC, the "storage" folder (see instructions) will become the "STORAGE" partition.

    With the infos you gave so far, I can't provide a solution. I don't know whether you copied the script folder into the storage folder, nor do I know which pins are used by your hardware. A circuit diagram and / or an example script by the manufacturer would help.

    PS: If you can't access the "STORAGE" partition on PC (Windows), use the PC program PuTTY to copy from PC to RPi.

    I know it's not the point of this thread but all you can access from a windows PC is /flash directory..

    It works ...! I `m so stupid... I shouldn't be counting pins at 2am at night ... Since I connected a fan to pin 4 and pin 6, I didn't see that I didn't connect pin1 and pin2. So I tried to make the connection between pins 7-8 instead of 5-6

    Thx for your help !

    By the way ... is it possible to reconnect the fan to a other Pin which is shut down if I´m in the shutdown mode ? Maybe I have to add something in that script.

    Glad you r sorted...fan doesn't have to be full trottle...it should work fine on 3.3 just a little slower...or do what Da Flex recommended...you can also use same circuit for PWM Fan setup..works fine on RPI..

    satfan The code looks OK, I'm using the same import. Maybe you are using wrong apostrophe signs at the sys.path.append line.

    script seems to hang on line 4

    Code
    import RPi.GPIO as GPIO

    That shouldn t be on line 4 if you copied the script I showed you...looks like you r still loading your first script listen-for-shutdown.py without the rest