mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Allow TrafficLights, RGBLED and Motor to be constructed using GPIO 0
This commit is contained in:
@@ -569,7 +569,7 @@ class TrafficLights(LEDBoard):
|
||||
"""
|
||||
def __init__(self, red=None, amber=None, green=None,
|
||||
pwm=False, initial_value=False):
|
||||
if not all([red, amber, green]):
|
||||
if not all(p is not None for p in [red, amber, green]):
|
||||
raise GPIOPinMissing(
|
||||
'red, amber and green pins must be provided'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user