This site provided the answer I needed to my GPIO problem.
I was getting the error: "ModuleNotFoundError: No module named 'RPi'"
To fix the problem, run: 'sudo apt install python3-rpi.gpio' on the Raspberry Pi.
My setup is Raspberry Pi running Raspbian Lite as a headless server. I ...
On the first RPi :
In a first terminal : (create FIFO)
In a second terminal : (Write datas into FIFO)
readfifo-writeUART.py : pyserial short-intro
with serial.Serial() as ser:
ser.baudrate = 19200
though it is probably Pi 3 specific, since it didn't work for my Pi 4
It works on the 4 as well, you just need to set the right trigger. The instructions that you provided are not applicable to the 4 or just incorrect.
This will tell you what triggers you have available:
To enable manual control on a 4, do:
echo gpio |...
Pins 3,5 on ALL model Pi (GPIO2,3 on 40 pin Pi) have 1.8kΩ pullups on the board, so the state of internal pullups is irrelevant!
They can ONLY be pulled LOW by programming the pin as OUTPUT - this will never happen unless you do something explicit to cause it.
If you have enabled I²C it may change state as SCL is setup.
In any event, using these pins for ...