Escolar Documentos
Profissional Documentos
Cultura Documentos
This is a small scale single RGB LED traffic light with controls from AtTiny85. You will use the supplied Arduino Uno to send
instructions to the ATtiny85.
HOW IT WORKS:
1. The device starts at red LED first for about 3 seconds.
2. Then, the LED turns green for about 6 seconds.
3. Three seconds before green timeout, the green led flashes then goes orange for 1 second.
4. LED will turn red and then repeat steps 1 through four continuously.
Bill of Materials:
1. Simple use a red jumper to indicate VCC (5V) and connect from +5V on the Arduino to:
a)Pin 8 At-Tiny
2. Use black jumper to indicate ground GND on Arrduino to:
a)Pin 4 ATtiny
d)Longest pin on the RGB LED (common cathode)
Step 2 - RGB Mapping
1. Connect second longest pin of RGB LED to pin 3 of At-Tiny 85 (NOTED:GREEN COLOR)
2.Connect shortest pin of RGB LED to pin 2 of At-Tiny 85 (NOTED:RED COLOR)
void loop()
{
digitalWrite(R, HIGH);
delay(4000); // MILI-SECONDS FOR RED LED ON
digitalWrite(R, LOW);
digitalWrite(G, HIGH);
delay(3000); // MILI-SECONDS FOR LED ON MINUS 3 SECONDS (6000-3000=3000)
4. UPLOAD sketch.
5. Your comments below the source code space will give output almost likely as this.
'Done uploading'
2. Solder mini-a usb female,8 pin IC Socket and rgb led to the PCB
3. Attach At-Tiny 85 to the IC socket.
4. All ready to go. Plug in male mini-a usb to the female that is on board.