Adobe Connect | Adobe Conect Custom Pods | AutoHotkey | Android | Arduino | Blog | COMM140 | Fractals | Grammar Checkers | Knots | a Million Dots | Processing | RedBubble | Tutorials | Weather | World Time Meeting Planner |
Home > Tutorials > Arduino > Projects >Traffic Lights running on an ATTiny85
See How-To: Shrinkify Your Arduino Projects
This project was created for the Ballarat fire brigade where I am a volunteer fire fighter.
The rational for the project was to build a set of red & green "traffic lights" connected to the fire station door.
The lights would turn red as soon as the door starts to open and then green when they are fully open.
When the door is fully closed the red light turns off. When either the red or green light has been on for 12 minutes they will turn off this will prevent the globes from burning out.
Purpose to turn on a Red warning light when the door is not fully open, and to turn on a Green light when the door is fully open.
Note there is a micro switch that detects when the door is closed and another switch that detects when the door is fully open.
The switch at the bottom of the door is normally open
Turn off both LED's while bottomSwitch_3 (8) is LOW
Turn on the Red LED as soon as the door starts to open
see board layout http://www.rupert.id.au/tutorials/arduino/
int redLedPin = 2;
int counterGreen = 0;
Russell, R. (2016, July 05, 07:25 am). Traffic lights running on an attiny85.
Retrieved March 19, 2018, from http://http://www.rupert.id.au/tutorials/arduino/projects/traffic-lights/index.php
Last refreshed: March 19 2018. 05:55.15 pm
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.