@@ -153,7 +153,7 @@ Constructor arguments:
153
153
1 . ` pin ` Mandatory. The initialised Pin instance.
154
154
2 . ` suppress ` Default ` False ` . See
155
155
[ section 4.1.1] ( ./DRIVERS.md#411-the-suppress-constructor-argument ) .
156
- 3 . ` sense ` Default ` None ` . See
156
+ 3 . ` sense ` Default ` None ` . Option to define electrical connection. See
157
157
[ section 4.1.2] ( ./DRIVERS.md#412-the-sense-constructor-argument ) .
158
158
159
159
Methods:
@@ -227,12 +227,21 @@ set, `release_func` will be launched as follows:
227
227
228
228
### 4.1.2 The sense constructor argument
229
229
230
+ In most applications it can be assumed that, at power-up, pushbuttons are not
231
+ pressed. The default ` None ` value uses this assumption to assign the ` False `
232
+ (not pressed) state at power up. It therefore works with normally open or
233
+ normally closed buttons wired to either supply rail. This without programmer
234
+ intervention.
235
+
236
+ In certain use cases this assumption does not hold, and ` sense ` must explicitly
237
+ be specified. This defines the logical state at power-up regardless of whether,
238
+ at that time, the button is pressed. Hence ` sense=0 ` defines a button connected
239
+ in such a way that when it is not pressed, the voltage on the pin is 0.
240
+
230
241
When the pin value changes, the new value is compared with ` sense ` to determine
231
242
if the button is closed or open. This is to allow the designer to specify if
232
243
the ` closed ` state of the button is active ` high ` or active ` low ` .
233
244
234
- This parameter will default to the current value of ` pin ` for convienence.
235
-
236
245
###### [ Contents] ( ./DRIVERS.md#1-contents )
237
246
238
247
# 5. ADC monitoring
0 commit comments