What is Arduino UNO ?
Arduino UNO is a microcontroller board which can be connected on a computer using a USB cable, or it can be supply by Ac-to-Dc Adapter. Uno has 14 output and input pins, on that 14, 6 of them can be used as a PWM outputs.
What will i learn in following this tutorial ?
Components Needed
Difficulty
Tutorial :
Step 1 : Physical Connection of LED to Arduino UNO.
Connect the following :
Step 2 : Connection of Arduino IDE to Arduino UNO
Connect the Arduino UNO using the USB cable to a computer.
Open your Arduino IDE, go to Tools > Board > and choose Arduino/Genuino Uno.
Step 3 : The Code
int LED1 = 13;
int LED2 = 12;
int LED3 = 11;
void setup()
{
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
}
void loop()
{
digitalWrite(LED1, HIGH);
delay(200);
digitalWrite(LED2, HIGH);
delay(200);
digitalWrite(LED3, HIGH);
delay(200);
digitalWrite(LED1, LOW);
delay(300);
digitalWrite(LED2, LOW);
delay(300);
digitalWrite(LED3, LOW);
delay(300);
}
Step 4 : Compile and Run
Remember that the LED has two tails, the short tail will be the negative and the long tail will be the positive. If you have change the code, compile and upload it again so that the latest code will run.
Thank you for following my Tutorial