Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.sys.raspberry-pi    |    Raspberry Pi computers & related hardwar    |    26,127 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 25,612 of 26,127    |
|    John R Walliker to Chris Green    |
|    Re: Has gpio changed completely betwen b    |
|    28 Aug 25 16:15:24    |
      From: jrwalliker@gmail.com              On 28/08/2025 15:24, Chris Green wrote:       > I have upgraded my Pi 4B from bookworm to trixie and, while most       > things work fine, my gpiod code in Python is completely broken. Can       > anyone confirm that everything has changed a lot or am I going mad?       >       You are not going mad. Here are before and after examples from       a shell script that I had to change. It reads a PIO pin and puts       a message in a log file if a PIR detector has been triggered.       There will be some equivalent change in Python.       John              BEFORE              #!/bin/bash              echo "9" > /sys/class/gpio/export       echo "in" > /sys/class/gpio/gpio9/direction              while true;       do              temp=$( /sys/class/gpio/unexport                     AFTER              #!/bin/bash              while true              do              temp=$(pinctrl lev 9)        if [[ $temp -eq 1 ]];        then        echo -n "Ceiling "; date; echo        fi              sleep 2              done              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca