You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
When using a gpio pin for input, particularly with switches, the value may sometimes be floating and may read true when there is no input even connected.
A solution is often to add a pull up or pull down resistor to the circuit and because it's so common, they are integrated into the Pi directly. The python sdk has an optional parameter to indicate if a pull up or down should be applied to the pin when it is set up. This is currently missing in the dart sdk and could greatly simplify circuits.
The text was updated successfully, but these errors were encountered:
Having looked further into this I don't think there is a way to set up the built-in pull up or pull down resistors through the sysfs interface.
If the built-in pull up or pull down resistors are used I think the best solution is to make sure they are configured before actually attaching anything to the pins.
I am pretty sure that /sys/class/gpio/gpio<pin#>/active_low does not affect the internal pull-up/pull-down. The only way to access the pull-up/pull-down are through the memory mapped API.
When using a gpio pin for input, particularly with switches, the value may sometimes be floating and may read true when there is no input even connected.
A solution is often to add a pull up or pull down resistor to the circuit and because it's so common, they are integrated into the Pi directly. The python sdk has an optional parameter to indicate if a pull up or down should be applied to the pin when it is set up. This is currently missing in the dart sdk and could greatly simplify circuits.
The text was updated successfully, but these errors were encountered: