question

buddhafragt avatar image
buddhafragt asked

RPi GPIO digital inputs pullup

for the digital input GPIO ports, how can I (permanently) set the internal pull-up resistors activated?

for the console I found this:

gpio -g mode 4 up # up

But how to activate permanently?

Raspberry Pi
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
gerard-van-seventer avatar image
gerard-van-seventer answered ·

You could set the state of the pins in config.txt

See also: https://www.raspberrypi.com/documentation/computers/config_txt.html#gpio-control

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

buddhafragt avatar image buddhafragt commented ·

I have done it in the config.txt and working!

Thanks!

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem buddhafragt commented ·
Great. I'll need to check older versions of Venus OS but this looks promising. Thanks.
0 Likes 0 ·
Kevin Windrem avatar image
Kevin Windrem answered ·

I do this with a DT overlay in my RpiGpioSetup package but the config.txt method is cleaner if it works for Venus OS. I haven't tested it yet.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.