tikismoke / domogik-plugin-rpigpio

GNU General Public License v3.0
0 stars 0 forks source link

Add pull up/down in software as option #2

Open tikismoke opened 8 years ago

tikismoke commented 8 years ago

If user don't want to add a 10k resistor to input.

See https://sourceforge.net/p/raspberry-gpio-python/wiki/Inputs/

The RPi.GPIO module allows you to configure the Broadcom SOC to do this in software: GPIO.setup(channel, GPIO.IN, pull_up_down=GPIO.PUD_UP)

or

GPIO.setup(channel, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) (where channel is the channel number based on the numbering system you have specified - BOARD or BCM).