walterwoj
Posts: 28
Joined: Fri Mar 15, 2019 10:46 pm

config.txt gpio commands

Fri Jul 26, 2019 10:21 pm

I have been testing this out and it would appear this does not apply to all pins. I put this in my config file:

Code: Select all

# Set GPIO Default Positions
# Set to Pull Up Output
gpio=22,23,24,25,26,27,28,29=pu,dh,op
# Set To Pull Up Input
gpio=1,4,5,6,10,11,12,13,14,15,16,=pu,ip
And MOST of the pins change, but not all. In my case the pins 13, 23, 24, 28 and 19 are still 'floating' and the pull up resistor is not engaged. I can engage it manually from the command line and the pins respond but not through the config file. I have even tried the commands individually and those pins do not obey the config file. I have watched them during boot and they do not flicker or change then change back so I don't think there is another file conflicting with it.. I have also only modified the one file for this purpose, so any conflicts would be from stock raspbian.

Any thoughts or guidance?

User avatar
neilgl
Posts: 1102
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: config.txt gpio commands

Fri Jul 26, 2019 11:01 pm

Have you updated to the latest gpio

walterwoj
Posts: 28
Joined: Fri Mar 15, 2019 10:46 pm

Re: config.txt gpio commands

Sat Jul 27, 2019 4:39 am

Yes, I did a full update/upgrade just this week.

DirkS
Posts: 9957
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: config.txt gpio commands

Sat Jul 27, 2019 6:10 am

Some of the GPIO numbers seem to be invalid. Are you sure you're using the correct number scheme (BCM)
See https://pinout.xyz/

User avatar
neilgl
Posts: 1102
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: config.txt gpio commands

Sat Jul 27, 2019 1:31 pm

When I set BCM 23 and BCM 24 to outputs in config.txt

Code: Select all

gpio=23,24 =pu,dh,op
it works fine on a Pi2, they are set to outputs 3V3. BCM 23 is physical pin 16.
Similarly, BCM 13 as an input is working OK. (physical pin 33). How are you measuring "floating"
Also which physical pin on the 40 pin connector are you looking at for your BCM 29?

Return to “Beginners”