0

I'm using to systemd to launch my application and on starting the application the GPIO07 is configured as Output and set to High I want to set it to low as the system startup.

0

2 Answers 2

1

If you want to ensure the GPIO is low you need to connect a resistor of about 4k7 ohms between the GPIO and a ground pin.

The GPIO will then stay low until it is configured to be an output.

3
  • is there a way to change the default configuration to set it to low on start up ? Commented Oct 10, 2022 at 15:23
  • There are several ways. Look at the documentation for config.txt. All software methods will suffer from glitches.
    – joan
    Commented Oct 10, 2022 at 15:25
  • @joan: A point of clarification, please: Are you including directives in /boot/config.txt as software methods?
    – Seamus
    Commented Oct 11, 2022 at 7:04
1

On boot ALL GPIO are configured as INPUTS. A few have pull up so may appear as HIGH. Others have pull down.

The easiest solution is to pick a GPIO which is configured to be what you want. The most reliable is to use a resistor to pull LOW.

It is possible to set GPIO state in config.txt but this will have a short delay.

All of the above is documented (and answered many times).

Not the answer you're looking for? Browse other questions tagged or ask your own question.