Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 858 Bytes

File metadata and controls

25 lines (17 loc) · 858 Bytes

Traffic Lights controller

Variations

Presentations

Preparation

  • Install guizero using pip:
    • sudo pip3 install guizero
  • Place a traffic lights set (e.g. pi-stop) on the GPIO pins
  • Alternatively, wire up three LEDs (red, yellow and green) to the GPIO pins using a breadboard

Notes

  • Be careful with capitalisation in Python
  • Make sure the pins used are the same as in the code
  • Note that guizero is an new experimental library currently in beta - usage is likely to change as the library is developed
    • The current version of this worksheet uses guizero v0.2.1
  • Refer to GPIO Zero docs and guziero docs