updating pins

changing pin assignments- have other plans for the STEMMA connector now
This commit is contained in:
BlitzCityDIY 2022-05-20 11:12:20 -04:00
parent 0083daf55d
commit 8fddc89622

View file

@ -7,8 +7,8 @@ import alarm
from digitalio import DigitalInOut, Direction, Pull from digitalio import DigitalInOut, Direction, Pull
# setup pins for the traffic light LEDs # setup pins for the traffic light LEDs
red_light = DigitalInOut(board.A1) red_light = DigitalInOut(board.A1)
yellow_light = DigitalInOut(board.SCL1) yellow_light = DigitalInOut(board.A2)
green_light = DigitalInOut(board.A2) green_light = DigitalInOut(board.A3)
# array of LEDs # array of LEDs
lights = [red_light, yellow_light, green_light] lights = [red_light, yellow_light, green_light]
# the traffic light is common anode # the traffic light is common anode
@ -20,7 +20,7 @@ for light in lights:
light.direction = Direction.INPUT light.direction = Direction.INPUT
light.pull = Pull.UP light.pull = Pull.UP
# button pin setup # 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 to track which light is on
count = 2 count = 2
# tracks the last light # tracks the last light