Raspberry Pi Pinout

This page needs translating, can you help?

Traffic HAT

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

from gpiozero import TrafficHat
from time import sleep
from signal import pause

hat = TrafficHat()

# control components individually
hat.lights.green.on()
sleep(1)
hat.lights.amber.on()
sleep(1)
hat.lights.red.on()
sleep(1)
hat.buzzer.on()
sleep(1)
hat.off()  # turn everything off

# set up events on button press/release
hat.button.when_pressed = hat.lights.blink
hat.button.when_released = hat.lights.off

pause()

Details

  • Yapılan Ryanteck
  • HAT form-factor
  • EEPROM ID
  • 5v ve 3.3V Güç
  • Kullanan 5 GPIO pins
Traffic HAT