updating pins
changing pin assignments- have other plans for the STEMMA connector now
This commit is contained in:
parent
0083daf55d
commit
8fddc89622
1 changed files with 3 additions and 3 deletions
|
|
@ -7,8 +7,8 @@ import alarm
|
|||
from digitalio import DigitalInOut, Direction, Pull
|
||||
# setup pins for the traffic light LEDs
|
||||
red_light = DigitalInOut(board.A1)
|
||||
yellow_light = DigitalInOut(board.SCL1)
|
||||
green_light = DigitalInOut(board.A2)
|
||||
yellow_light = DigitalInOut(board.A2)
|
||||
green_light = DigitalInOut(board.A3)
|
||||
# array of LEDs
|
||||
lights = [red_light, yellow_light, green_light]
|
||||
# the traffic light is common anode
|
||||
|
|
@ -20,7 +20,7 @@ for light in lights:
|
|||
light.direction = Direction.INPUT
|
||||
light.pull = Pull.UP
|
||||
# button pin setup
|
||||
pin_alarm = alarm.pin.PinAlarm(pin=board.SDA1, value=False, pull=True)
|
||||
pin_alarm = alarm.pin.PinAlarm(pin=board.A0, value=False, pull=True)
|
||||
# count to track which light is on
|
||||
count = 2
|
||||
# tracks the last light
|
||||
|
|
|
|||
Loading…
Reference in a new issue