diff --git a/gpiozero/input_devices.py b/gpiozero/input_devices.py index 05682cb..7e89709 100644 --- a/gpiozero/input_devices.py +++ b/gpiozero/input_devices.py @@ -534,7 +534,7 @@ class DistanceSensor(SmoothedInputDevice): from gpiozero import DistanceSensor from time import sleep - sensor = DistanceSensor(18, 17) + sensor = DistanceSensor(echo=18, trigger=17) while True: print('Distance: ', sensor.distance * 100) sleep(1)