Saturday, 15 December 2018

Arduino : Blinking LED

Simple and first program of Arduino  for blinking of LED. [ This program is look like "Hello World"  for arduino.

Required Items.
1. LED
2. Arduino
3. 5V

Program for blinking of LED in Arduino.


#define  LED 13 // It will connect to digital pin 13  you can choose your own pin.

// the setup function runs once when you press reset or power the board
void setup() {
    pinMode(LED, OUTPUT);

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(2000);                       // wait for a second
  digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
  delay(2000);                       // wait for a second

LED 13 shows the Pin for input the longwirde of Led.

No comments:

Post a Comment