Hi,
Does anyone know if the gpio-plugin sets pullup/pulldown state on inputs??
When not, what would be the best way to set these?
GPIO plugin behaviour towards pullup / pulldown resistors
Hi,
Does anyone know if the gpio-plugin sets pullup/pulldown state on inputs??
When not, what would be the best way to set these?
try with “inverted”
{
"id": "presence-sensor",
"class": "GpioPresence",
"name": "motion detector",
"gpio": 18,
"inverted": true
}
so by changing to inverted, it sets pulldown-resistor?
and default there is a pullup?
@djazzz No, you need configure the pullup/pulldown resistors as part of the device tree setup
For example, see ee https://github.com/fivdi/onoff/wiki/Enabling-Pullup-and-Pulldown-Resistors-on-The-Raspberry-Pi
EDIT: Note beyond, with Raspberry Pi, most GPIOs have either their pull-up or pull-down resistor activated by default. The defaults can be seen in Table 6-31 on pages 102 and 103 of the BCM2835 ARM Peripherals documentation.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
thanks !