From 90db61f0ba5b92313bf51e88d8c8da0cda31641f Mon Sep 17 00:00:00 2001 From: Ben Nuttall Date: Wed, 8 Jun 2016 16:31:50 +0100 Subject: [PATCH] Check enable is not None, in case it's GPIO0 --- gpiozero/output_devices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpiozero/output_devices.py b/gpiozero/output_devices.py index a6c8b95..ef04a11 100644 --- a/gpiozero/output_devices.py +++ b/gpiozero/output_devices.py @@ -814,7 +814,7 @@ class Motor(SourceMixin, CompositeDevice): 'forward and backward pins must be provided' ) PinClass = PWMOutputDevice if pwm else DigitalOutputDevice - if enable: + if enable is not None: super(Motor, self).__init__( forward_device=PinClass(forward), backward_device=PinClass(backward),