pinout.vvzero.com/src/en/overlay/traffic-hat.md
RogueM 96f8792cd9 Misc overlay tweaks
- 26-way merged back into Custom
- new COM and MCU types keywords
- Other types boards sorted into discrete types
- misc other overlay tweaks
2016-06-26 15:35:20 +01:00

995 B

#Traffic HAT

###A quick and easy way to learn the basics of GPIO on a budget. All in a nice HAT.

import RPi.GPIO as IO
from time import sleep

IO.setmode(IO.BCM)

#Lights
IO.setup(22,IO.OUT)
IO.setup(23,IO.OUT)
IO.setup(24,IO.OUT)

#Buzzer
IO.setup(5,IO.OUT)

#Button
IO.setup(25,IO.IN,pull_up_down=IO.PUD_UP)