Possible to set GPIO input to detect positive voltage aka pulldown?

Hello Everyone,

I have a question regarding input detection on BBB GPIO. I am working to switch from using Raspberry Pi to the BBB. I’m running into issues when it comes to reading inputs.

On both devices I can:

sudo su //become root cd /sys/class/gpio echo "GPIONumber" >> export //create directory to work with GPIO pin cd gpio<number> echo "in" >> direction //set to detect input cat value //determine the current input

On the Raspberry Pi by default I get a value of “0” when nothing is connected to that port.
With the BBB by default I get a value of “1” when nothing is connected.

If I connect the Raspberry Pi to the +3.3v line I get a “1”, and the BBB if I ground the port I get a “0”.

After Googling around the web I found that the Raspberry Pi GPIO is set to pulldown and the BBB is set to pullup.

Is there a way to easy set the GPIO pins to pulldown on the BBB (not using bonescript). The only tutorials I can find have to do with /sys/kernal/omap_mux…

I am assuming that I am going to have to work with the device tree (something I’ve been avoiding). Is there a way to do this without touching the device tree? If not, does anyone have an example how to do this. I will continue to research how to work with the device tree but any guidance on how to accomplish switching the GPIO input settings from pullup to pulldown would be greatly appreciated.


Just as an update I found out this can only be done with device trees.