loading

Welcome to another instructable

Here we are going to conect a led to arduino and make it to turn on and off every 1 second

(

Bienvenidos a otro instructable

Aqui vamos a conectar un led a arduino y vamos a encenderlo y apagarlo cada segundo

)

Step 1: Materials (Materiales)

We are going to use :

1) 1 Breadboard

2) 1 Wire

3) 1 Arduino Nano

4) 1 Resistor of 220 Ohms

5) 1 Led

6) 1 Usb Wire

(

Vamos a usar :

1) 1 protoboard

2) 1 Cable

3) 1 Arduino Nano

4) 1 resistencia de 220 Ohms

5) 1 Led

6) 1 Cable Usb

)

Step 2: Wiring (Conectando )

Put your arduino nano on the breadboard

Wire the resistor between the arduino digital pin 2 and the positive of the led

Wire the GND pin to the negative of the led

(

Coloca el arduino nano en la protoboard

Conecta la resistencia entre el pin digital 2 de arduino y el positivo del led

Conecta el pin GND al negativo del led

)

Step 3: Code (Codigo)

Open the arduino program and copy the code , then just upload ,more details on the picture

(Abre el programa de arduino y copia el codigo , despues solo subelo ,mas detalles en la imagen )

void setup()

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

pinMode(2,OUTPUT);

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

}

void loop()

{

//This part repeats (esta parte se repite )

digitalWrite(2,HIGH);

//turn on the led (Encendemos el led )

delay(1000);

// We make a delay of 1 second 1000 = 1 second (Hacemos un delay de 1 segundo 1000 = 1 segundo )

digitalWrite (2,LOW);

//turn off the led (Apagamos el led )

delay(1000);

// We make a delay of 1 second 1000 = 1 second (Hacemos un delay de 1 segundo 1000 = 1 segundo )

}

Step 4: Finish and Video (Terminar Y Un Video )

After uploading the code , the led will start to turn on and off every second ,thanks for reading this instructable

(

Despues de cargar el codigo ,el led comenzara a encenderse y apagarse cada segundo , gracias por leer este instructable

)

About This Instructable

344views

9favorites

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: