We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0678f88 + 8fddc89 commit 301a35eCopy full SHA for 301a35e
Traffic_Light_Wearable/code.py
@@ -7,8 +7,8 @@
7
from digitalio import DigitalInOut, Direction, Pull
8
# setup pins for the traffic light LEDs
9
red_light = DigitalInOut(board.A1)
10
-yellow_light = DigitalInOut(board.SCL1)
11
-green_light = DigitalInOut(board.A2)
+yellow_light = DigitalInOut(board.A2)
+green_light = DigitalInOut(board.A3)
12
# array of LEDs
13
lights = [red_light, yellow_light, green_light]
14
# the traffic light is common anode
@@ -20,7 +20,7 @@
20
light.direction = Direction.INPUT
21
light.pull = Pull.UP
22
# button pin setup
23
-pin_alarm = alarm.pin.PinAlarm(pin=board.SDA1, value=False, pull=True)
+pin_alarm = alarm.pin.PinAlarm(pin=board.A0, value=False, pull=True)
24
# count to track which light is on
25
count = 2
26
# tracks the last light
0 commit comments