diff --git a/CPB_Keybutton_BLE/code.py b/CPB_Keybutton_BLE/code.py index 6b9b0428f..05c9d27fb 100644 --- a/CPB_Keybutton_BLE/code.py +++ b/CPB_Keybutton_BLE/code.py @@ -9,7 +9,9 @@ Attach five buttons with pullup resistors to Feather nRF52840 """ import time import board -from digitalio import DigitalInOut, Direction, Pull +from digitalio import DigitalInOut, Direction +# Uncomment if setting .pull below. +# from digitalio import Pull import adafruit_ble from adafruit_ble.advertising import Advertisement @@ -32,7 +34,8 @@ button_3.direction = Direction.INPUT button_4.direction = Direction.INPUT button_5.direction = Direction.INPUT -# NOTE: If you are not using buttons with built-in pullups, uncomment the five lines below. +# NOTE: If you are not using buttons with built-in pullups, uncomment the five lines below, +# and the `from digitalio import Pull` above. # button_1.pull = Pull.UP # button_2.pull = Pull.UP # button_3.pull = Pull.UP