Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 4260D782FE6 for <~alpine/devel@lists.alpinelinux.org>; Sun, 17 Apr 2022 17:01:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id CF16240457; Sun, 17 Apr 2022 19:01:06 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NJSCqgYOJRCT; Sun, 17 Apr 2022 19:01:05 +0200 (CEST) Message-ID: <85099931-9bf0-f804-bdd4-1969b26df380@disroot.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1650214862; bh=1AwdB6LKkzroKBJcMXAQyqK4qS3ebPJIeOeMnkCC1RM=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=jnToNtawlWhK3axLQ5a8D8AwOUc5LvhfcHx1IXjmx6t8yVcfbcN9f8QDXr0wFDagi lnqd4+yz69Ygdu25Rs3Cso3NY/9+vAOcnlii0zbrOGk6iZDHFSizE1esKw+JDDKNKj 4HF5pbByoZD+1BM1ZvSc9s3HdQESDXIvDimfqXPsHz2ysjWCXjcMON4WHbfhrCHjbQ 49XvLyHHNRvfSoi9IuErPEGboApNoXZJxqdjyRQTKs/wbA7aMNjfbRQ8tMM2uYP8cq AA6mp9NVzz8Q5GZvGmjIosC0uXyxIAit8lFszmjMgbr+Cu23ZhcvPrOy8/lePfH320 Uwca9RL1OFVqQ== Date: Sun, 17 Apr 2022 19:01:00 +0200 Mime-Version: 1.0 Subject: Re: Enable GPIO for RPi 4 Content-Language: de-DE To: Duncan Bellamy Cc: ~alpine/devel@lists.alpinelinux.org References: <2db66cb8-eb3d-e7cc-03ff-e3538b794c77@disroot.org> <8FF912BF-7CB4-478E-88D0-CF29DF411EA0@icloud.com> From: Thomas Schneider In-Reply-To: <8FF912BF-7CB4-478E-88D0-CF29DF411EA0@icloud.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hello, issue solved after pip install RPi.GPIO. Thanks for your support. Am 17.04.22 um 18:46 schrieb Duncan Bellamy: > Can you see gpio in /sys/class/gpio ? > > Or an overlay might > help: https://github.com/raspberrypi/firmware/blob/4fe2e4af02058f88f991469349a335a25a2c719d/boot/overlays/README#L1166 > >> On 17 Apr 2022, at 15:55, Thomas Schneider >> wrote: >> >> Hello, >> >> I want to use a RPi power button >> >> and this requires GPIO . >> >> However, it looks like GPIO is disabled in RPi 4. >> When I start a relevant Python program I get this error: >> $ sudo /usr/bin/python3 /opt/fanshim-python/examples/poweroff.py >> traceback (most recent call last): >>   File "/opt/fanshim-python/examples/poweroff.py", line 12, in >>     GPIO.wait_for_edge(button_pin, GPIO.FALLING) >> RuntimeError: Error waiting for edge >> >> Can you please advise how to fix this issue? >> >> This isssue is not reproducible with Raspbian OS (based on Debian). >> >> THX >> Thomas >>