Making an LED Blink Using Arduino UNO:
For making an LED Blink using Arduino, which is a very basic project a beginner can perform, We'll need some components and pre-requisite knowledge of using computer system.
Components Required:
- 1 * Arduino UNO
- 1 * USB Cable
- 1 * 220Ω Resistor
- 1 * LED
- 1 * Breadboard
- 2 * Jumper Wires
Procedure:
1. Make connections according to the circuit diagram.
2. Connect Arduino UNO to PC.
3. Upload the code provided.
4. Enjoy.
Code :
int ledPin=8; //definition digital 8 pins as pin // to control the LED void setup() { pinMode(ledPin,OUTPUT); //Set the digital 8 port mode, // OUTPUT: Output mode } void loop(){
digitalWrite(ledPin,HIGH); //HIGH is set to about 5V PIN8
delay(1000); //Set the delay time, 1000 = 1S
digitalWrite(ledPin,LOW); //LOW is set to about 5V PIN8
delay(1000); //Set the delay time, 1000 = 1S
}For downloading Arduino IDE visit:
Comments
Post a Comment