I would like to know, Is there a way to define a known state for the GPIO pins in my raspberry pi at boot. The issue is that whenever I boot-up my pi, it enables all of its pins and then grounds them, this really messes up the states of whatever is connected to those pins.
1 Answer
"whenever I boot-up my pi, it enables all of its pins and then grounds them"
No it doesn't. On boot ALL pins are INPUTS; pins 0-8 have pullup, others pull down.
Rather than being "unknown" the state is well defined.
Depending on what you configure in config.txt you can change shortly after boot.