Skip to content

bennuttall/pgz-traffic-lights

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

pgz-traffic-lights

Interactive traffic lights with pygame-zero and gpiozero

Traffic Lights

Usage

  • Clone this repo: git clone https://github.com/bennuttall/pgz-traffic-lights
  • Enter the directory: cd pgz-traffic-lights
  • Change the line lights = TrafficLights(2, 3, 4) to match your traffic light pin numbers (red, amber green)
  • Run with pgzrun trafficlights.py
  • Click a colour to light an LED

Also see trafficlights2.py which is a variation in code achieving the same result.

Reference

About

Interactive traffic lights with pygame-zero and gpiozero

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages