Raspberry Pi 5 Support for GPIO Broken

I figured that might be the issue, but I’m not the one who wrote gpiozero so I have no control over how those libraries are imported. The gpiozero 2.0 documentation states that Python 3.5+ is supported, so it seems odd that they’d explicitly write it to make a call to an internal library that didn’t exist until Python 3.8

1 Like

I altered the post title, as it was misleading. There is nothing wrong with PI5 Volumio core.
You are free to edit it any way to be more accurate

1 Like

Hello… i’m newbe with rpi and volumio,
i made simple script to use gpio , (based on Wheaten’s code.)

#!/bin/bash
GPIO0=12
GPIO1=23
GPIO2=24
GPIO3=25
debug=1

#date_val=$(date)
#echo “${date_val}”

while true; do
sleep 0.1
#date_val=$(date)
#echo “${date_val}”

    STATUS0=$(gpioget gpiochip4 ${GPIO0})
    STATUS1=$(gpioget gpiochip4 ${GPIO1})
    STATUS2=$(gpioget gpiochip4 ${GPIO2})
    STATUS3=$(gpioget gpiochip4 ${GPIO3})

    if [ $debug == 1 ]; then
            if [ ${STATUS0} == 1 ]
            then
                    #printf "%s GPIO 0: %s\n"  "${date_val}" "${STATUS0}"
                    ret=$(/usr/local/bin/volumio toggle)
                    #echo "${ret}"
                    sleep 1s
            fi
            if [ ${STATUS1} == 1 ]
            then
                    #printf "%s GPIO 1: %s\n"  "${date_val}" "${STATUS1}"
                    ret=$(/usr/local/bin/volumio next)
                    #echo "${ret}"
                    sleep 1s
            fi
            if [ ${STATUS2} == 1 ]
            then
                    #printf "%s GPIO 2: %s\n"  "${date_val}" "${STATUS2}"
                    ret=$(/usr/local/bin/volumio volume plus)
                    #echo "${ret}"
                    sleep 0.1
            fi
            if [ ${STATUS3} == 1 ]
            then
                    #printf "%s GPIO 3: %s\n"  "${date_val}" "${STATUS3}"
                    ret=$(/usr/local/bin/volumio volume minus)
                    #echo "${ret}"
                    sleep 0.1
            fi
    fi

done

and, i registered this script file to crontab.
it works fine.

@Wheaten is a smart one :slight_smile: