We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 18feec7 + 727b08f commit c7a4a8eCopy full SHA for c7a4a8e
README.rst
@@ -33,14 +33,17 @@ Usage Example
33
34
.. code-block:: python
35
36
- import board
37
- from digitalio import Pull
38
- from adafruit_debouncer import Debouncer
+ import board
+ import digitalio
+ from adafruit_debouncer import Debouncer
39
40
- switch = Debouncer(board.D12, Pull.UP)
+ pin = digitalio.DigitalInOut(board.D12)
41
+ pin.direction = digitalio.Direction.INPUT
42
+ pin.pull = digitalio.Pull.UP
43
+ switch = Debouncer(pin)
44
- while True:
- switch.update()
45
+ while True:
46
+ switch.update()
47
if switch.fell:
48
print('Just pressed')
49
if switch.rose:
0 commit comments