loading

Welcome to another instructable , now we are going to make a led traffic light with arduino and a led strip obtained from a escaner , but also the code will work well with a RGB led with common anode

(

Bienvenido a otro instructable , ahora vamos a hacer un semaforo led con arduino y una tira de led obtenida de un escaner , pero el codigo tambien trabaja bien con un led RGB con anodo comun

)

Step 1: Materials (Materiales)

We need

1 Arduino Nano

1 Breadboard

1 RGB Led Strip Common Anode or RGB Led Common Anode

1 Usb Wire

3 220 Ohms Resistor

(

Necesitamos

1 Arduino Nano

1 Protoboard

1 Tira led RGB con anodo comun o un led rgb con anodo comun

1 Cable Usb

3 resistencias de 220 Ohms

)

Step 2: Wiring (Cableado )

As we have a common anode Led , we need to conect de common to 5 Volts

The green led cathode to a resistor of 220 Ohms and then to D2

the red led cathode to a resistor of 220 Ohms and then to D3

The Blue Led cathode is not used for now

Before conecting the usb wire , check the conections

(

Como tenemos un led de anodo comun , necesitamos conectar el comun a 5 volts

El catodo del led verde va conectado a una resistencia de 220 Ohms y despues al pin D2

El catodo del led rojo va conectado a una resistencia de 220 Ohms y despues al pin D3

El catodo del led azul no es usado por ahora

Antes de conectar el cable usb ,Checa las conexiones

)

Step 3: Code (Codigo)

Just copy and paste the next code , then upload it

(

Solo copia y pega el codigo siguiente , despues subelo

)

void setup()

{

// We make the basic setup (hacemos ajustes iniciales)

pinMode(2,OUTPUT);

pinMode(3,OUTPUT);

//Define the digital pin 2 as an output (definimos el pin digital 2 como salida)

//Define the digital pin 3 as an output (definimos el pin digital 3 como salida)

}

void loop()

{

//This part repeats (esta parte se repite )

digitalWrite(2,HIGH);

digitalWrite(3,HIGH);

digitalWrite(2,LOW);

delay(5000);

digitalWrite(2,HIGH);

delay(500);

digitalWrite(2,LOW);

delay(500);

digitalWrite(2,HIGH);

delay(500);

digitalWrite(2,LOW);

delay(500);

digitalWrite(2,HIGH);

delay(500);

digitalWrite(2,LOW);

delay(500);

digitalWrite(2,HIGH);

delay(500);

digitalWrite(2,LOW);

delay(500);

digitalWrite(3,LOW);

delay(2000);

digitalWrite(2,HIGH);

digitalWrite(3,LOW);

delay(5000);

}

Step 4: Test It and Video (Probarlo Y Video)

Only plug the usb wire and see it works,you can watch the video to see how it works ,thanks for reading this instructable.

(Solo conecta el cable usb y ve como funciona ,puedes ver el video para ver como funciona gracias por leer este instructable )

About This Instructable

40views

0favorites

License:

Bio: I love to do electronics projects, and also to share them
More by ofernandez5:How to Wire an Arduino With a Led (Como Conectar Un Arduino Con Un Led) Recycle the Electronic Ballast From  Compact Fluorescent Lamp (Reciclar La Balastra Electronica De Un Foco Ahorrador ) Strip Traffic Light With Arduino  
Add instructable to: