Posts by Mario77

    Check your autostart.sh script if you just created it for any errors DOS format and not UNIX?

    this should start your script like on startup..

    Code
    sh /storage/.config/autostart.sh

    run this on autostart.sh

    Code
    dos2unix /storage/.config/autostart.sh
    
    chmod 777 /storage/.config/autostart.sh

    the autostart.sh in your zip file is in windows dos...needs to be unix format..but might have changed by uploading or downloading or whatever..not sure...try those 2 commands and you should be good to go..

    I just had a thought.
    A faulty usb to sata adapter couldn't short something in the pi and make HDMI audio not work could it?

    I have that, plus also that ssd fail, plus my spdif card on my pc seems faulty now as well.

    Plus I tried to charge my torch up from my pc and that won't charge from anything now.

    I am wondering if i have a fault somewhere.

    I can't think of anything other than the adapter and ssd that are common between my pc and pi.

    I had a cable like that for a long time connected to my pi2 and hdd never gave me problems...Now I got an external hdd connected which is a little better aesthetically but nothing else..

    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..