GPIO set to output by default on bootup?

Is it possible to prevent the Raspberry Pi from setting all the GPIO pins to HIGH on bootup?

That is more of a raspberry problem:
https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=162242

Solve my problem by just changing GPIO pin, suddenly pin 0 is automatically set to output at bootup, the other ones aren’t. :slight_smile:

Do you know anything about bootup scripts? I need a command to be run right after everything is fully loaded…? :slight_smile:

Hi ActionA,

I’ve tried to use rc.local.

My script is a loop checking for any irw signals incoming. I guess the irw command has to be run later or maybe just by the osmc user for work?

When I run the script from SSH it works correctly.

Are you using complete paths?

Yes I am, I can also see that the script should be running in “ps aux”.

So I guess the problem might be, that it is running to early in the bootup process?

Maybe the lirc service hasn’t started when the script is run?

No pins are set to output unless they are explicitly being used.
Unused pins are set to input (which may appear high if no pull-up is used).
See here for default pin usage: firmware/extra/dt-blob.dts at master · raspberrypi/firmware · GitHub

Which pin are you using?