I've been getting into GPIO recently with the GPIOZero library but when i first tried it today it completely failed. As my first foray into GPIO i set up a circuit to light up an LED with the push of a button, so simple nothing could go wrong, right? I imported the library like so: from gpiozero import Button, LED
then i set up my components: led = LED(17)
then the button: btn = Button(4)
And then this happened:
I have attempted to re download the library but sudo apt-get install python3-gpiozero
said that it was the latest version.
This is the circuit:
simulate this circuit – Schematic created using CircuitLab
First: what doe this error mean?
Second: How can i fix it?
sudo python3
and then enter in the python commands i get the error but if i save i file with the code it does nothing