How to Wire an Arduino With a Led (Como Conectar Un Arduino Con Un Led)
Intro: How to Wire an Arduino With a Led (Como Conectar Un Arduino Con Un Led)
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
)