Rpi.GPIO is not supported on Rpi 5. There's a new module called
gpiozero and it doesn't have the same features. Instead of reading an input
and checking its state, inputs are define through the "Button" class.
I had to edit the code to make a button instance, then check
button.is_pressed() to see if the button is pressed.
It is nice, but different.
Same with the LED. Instead of setting that pint high or low, you create an
instance of LED and use it's on or off function. There's also a blink
function, but on and off fit your code better.
Rpi.GPIO is not supported on Rpi 5. There's a new module called
gpiozero and it doesn't have the same features. Instead of reading an input
and checking its state, inputs are define through the "Button" class.
I had to edit the code to make a button instance, then check
button.is_pressed() to see if the button is pressed.
It is nice, but different.
Same with the LED. Instead of setting that pint high or low, you create an
instance of LED and use it's on or off function. There's also a blink
function, but on and off fit your code better.