Is it possible to turn off/on 5v GPIO4 Raspberry Pi from software?

  • Install the RPi Tools add-on and you have RPi.GPIO and gpiozero to play with. Google them for more details.

  • I have libreelec 8.1.1 and RPi.GPIO add-on is not in the repo. Can someone point me in the right direction?

    I'm looking to write a couple scripts for fan and status led control, but can't seem to find anything useful in my searches.

    I have an ODROID C2

  • Jayge91, read post above yours (about installing RPi Tools add-on).

    Done giving support here because of last events.

  • RPi.GPIO is part of RPi Tools add-on. Install it and you will get required functionality.

    Done giving support here because of last events.

  • I m in no way an expert of gpio pins but don't think you can switch pin 4 with a script..that's connected to the pi power supply..so basically you r taking current direct from wall adaptor...

    To control pins 2 and 4 you ll need to use a gpio and a relay or npn transistor...with that script you control the transistor to cut current from pin 4 by disconnecting pin 6 (Ground)

  • I have libreelec 8.1.1 and RPi.GPIO add-on is not in the repo. Can someone point me in the right direction?

    I'm looking to write a couple scripts for fan and status led control, but can't seem to find anything useful in my searches.

    I have an ODROID C2

    Is this what you'r looking for?This is a project using rpi fan control with speed control and rgb led...