Hello everybody, this is my first post in this forum, hope this is the right place for the kind of issue I'm having.
So I'm pretty new to GPIO programming and fairly new to programming as a whole. A while ago, I got myself a Pi, and a starter kit that was reasonably priced and had a bunch of small gadgets and sensors and whatnot. It also had a neat collection of pdf-files explaining how to use everything, example code included. Those tutorial were very convenient and worked great at first, right up until earlier today when I tried to programm a button and hit a brick wall. After 2 hours of debugging I figured out, that I was using the RPi.GPIO-Library this whole time which is outdated apparently and can't handle edge detection anymore.
So I switched to lgpio instead and almost immediately hit another brick wall because none of my code works anymore, the syntax feels completely different, and there is next to no documentation or beginner-friendly material about it. So here's my question:
How am I supposed to learn how to use this library?
There is almost nothing on it on the internet, and the few tutorials that are out there are mostly outdated and contradict eachother, because apparently, the entire library was completely overhauled somewhere in between 10 month ago and none of the stuff that worked back then works now. Consequently, AIs can't help with this problem either because there simply is no material for them to go off of so they start making up nonsense. So...
What do I do? What did YOU do to learn how to use this library? I tried to, I really did. Spend 3 hours to make my relatively simple code (push a button to turn an LED on) work, but I just don't understand what the documentation is trying to tell me about how to use events. lg library is just confusing and the documentation on rpi-lgpio was literally just...wrong. I'm sorry, but most of the methods and fuctions that site claims to be in the library are just not in the library. What am I missing here? I really DID search for the answers, looked through 20 pages of google searches, asked 3 different AIs. Nobody tells. I kinda feel like a newbie trying to get into Dark Souls and my only method of learing about the game is through the XboxLive lobby. It's immensely frustrating. Please help :/
P.S.: I know there's gpiozero which is easier to learn and also yes, I could definitely use loops and conditions to solve my button-problem without using the library much, but truth be told, I WANT to learn to use it. Truth be told, I have a specfic goal in mind, and for that to work I need code that is ressourceful and also relies on functionalities gpiozero doesn't have. So yeah, there is no way around it for me...
So I'm pretty new to GPIO programming and fairly new to programming as a whole. A while ago, I got myself a Pi, and a starter kit that was reasonably priced and had a bunch of small gadgets and sensors and whatnot. It also had a neat collection of pdf-files explaining how to use everything, example code included. Those tutorial were very convenient and worked great at first, right up until earlier today when I tried to programm a button and hit a brick wall. After 2 hours of debugging I figured out, that I was using the RPi.GPIO-Library this whole time which is outdated apparently and can't handle edge detection anymore.
So I switched to lgpio instead and almost immediately hit another brick wall because none of my code works anymore, the syntax feels completely different, and there is next to no documentation or beginner-friendly material about it. So here's my question:
How am I supposed to learn how to use this library?
There is almost nothing on it on the internet, and the few tutorials that are out there are mostly outdated and contradict eachother, because apparently, the entire library was completely overhauled somewhere in between 10 month ago and none of the stuff that worked back then works now. Consequently, AIs can't help with this problem either because there simply is no material for them to go off of so they start making up nonsense. So...
What do I do? What did YOU do to learn how to use this library? I tried to, I really did. Spend 3 hours to make my relatively simple code (push a button to turn an LED on) work, but I just don't understand what the documentation is trying to tell me about how to use events. lg library is just confusing and the documentation on rpi-lgpio was literally just...wrong. I'm sorry, but most of the methods and fuctions that site claims to be in the library are just not in the library. What am I missing here? I really DID search for the answers, looked through 20 pages of google searches, asked 3 different AIs. Nobody tells. I kinda feel like a newbie trying to get into Dark Souls and my only method of learing about the game is through the XboxLive lobby. It's immensely frustrating. Please help :/
P.S.: I know there's gpiozero which is easier to learn and also yes, I could definitely use loops and conditions to solve my button-problem without using the library much, but truth be told, I WANT to learn to use it. Truth be told, I have a specfic goal in mind, and for that to work I need code that is ressourceful and also relies on functionalities gpiozero doesn't have. So yeah, there is no way around it for me...
Statistics: Posted by FlipBoing — Wed May 21, 2025 6:11 pm