LED Traffic light running from the GPIO pins on a Raspberry Pi 2
Coded in python
Running on Raspbian
This took 2 evenings and half a day of testing and building to make work from scratch. Not following any tutorials, just a goal in mind and using Google to find what I need for the python code.
The code loops and changes stage every 5 seconds, following a typical British traffic light pattern.
Breadboard designed in Fritzing, schematic also designed in Fritzing.
———————————————
Parts:
1x Green LED
1x Yellow LED
1x Red LEX
3x 50 ohm resistor
3x 10k ohm resistor
3x NPN transistor
———————————————
The LED’s are controlled by the transistors using 3 GPIO pins, all powered by a 5v GPIO pin and a ground GPIO pin
———————————————
“Pamgaea” Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
https://creativecommons.org/licenses/by/3.0/
Post time: Jun-15-2017