Assignment #3

Hidden from students:LabeAssignment #3 -
Go over Traffic Signal
Parts: 1k Resistor (brn, blk, red, gold), Potentiometer, Momentary Switch, 6 more wires
Review "Quiz"
Cyborg CockroachMIT CheetahsLeonardoDemo: Pulsed LED - Fade with Potentiometer
In Class We'll Discuss Comic Strip Page 12 - 14
if-then example - Link
- Pull down Resistors - Momentary Switches

- Potentiometers

- PWM Pulse Width Modulation Dimming

- Keep your traffic light LEDs wired to Pins 4,5,6
- Wire a momentary switch with Pull Down Resistor to Pin 3
- Wire a potentiometer to Pin A0

Save your traffic light sketch as
Switch and PotentiometerAdd code so that:
1) with the switch not pressed the Green LED stays on.
2) pressing the switch switches the signal to yellow for 3 seconds, then Red for 10 seconds.
3) The Potentiometer adjusts the brightness of the Green LED
void setup() {
// put your setup code here, to run once
}
void loop() {
// put your main code here, to run repeatedly:
}