mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Add Ryanteck TrafficHat based on FishDish (untested)
This commit is contained in:
@@ -26,12 +26,6 @@ class TrafficLights(object):
|
|||||||
led.blink(on_time, off_time)
|
led.blink(on_time, off_time)
|
||||||
|
|
||||||
|
|
||||||
class PiTraffic(TrafficLights):
|
|
||||||
def __init__(self):
|
|
||||||
red, amber, green = (9, 10, 11)
|
|
||||||
super(FishDish, self).__init__(red, amber, green)
|
|
||||||
|
|
||||||
|
|
||||||
class FishDish(TrafficLights):
|
class FishDish(TrafficLights):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
red, amber, green = (9, 22, 4)
|
red, amber, green = (9, 22, 4)
|
||||||
@@ -55,6 +49,15 @@ class FishDish(TrafficLights):
|
|||||||
super.off()
|
super.off()
|
||||||
|
|
||||||
|
|
||||||
|
class TrafficHat(FishDish):
|
||||||
|
def __init__(self):
|
||||||
|
red, amber, green = (24, 23, 22)
|
||||||
|
super(PiTraffic, self).__init__(red, amber, green)
|
||||||
|
self.buzzer = Buzzer(5)
|
||||||
|
self.button = Button(25)
|
||||||
|
self._all = tuple(list(self._leds) + [self.buzzer])
|
||||||
|
|
||||||
|
|
||||||
class PiLiter(object):
|
class PiLiter(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
leds = (4, 17, 27, 18, 22, 23, 24, 25)
|
leds = (4, 17, 27, 18, 22, 23, 24, 25)
|
||||||
|
|||||||
Reference in New Issue
Block a user