[Project 1] – Arduino භාවිතයෙන් LED එකක් Blink කරමු

You are here:
  • KB Home
  • Arduino
  • [Project 1] – Arduino භාවිතයෙන් LED එකක් Blink කරමු
Estimated reading time: 1 min

This project is our first arduino project. Now let’s a program to control the LED. As you now, each program must contain at least two functions “setup( ), loop( )”. In this program HİGH means 5V, LOW means 0V. The led will be off and on per 1000 milliseconds. This will continue until power is removed from the arduino. To understand and make arduino projects you should know electronic circuit elements and you need to thoroughly learn arduino programming language.

Schema:

Materials:

  1. ARDUİNO UNO x 1
  2. 330 OHM     x 1
  3. LED    x 1
  4. JUMPER CABLE

 

Blinking LED program:

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

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

 

 

 

Tags:
Was this article helpful?
Dislike 0
Views: 236

Leave a Reply

Your email address will not be published. Required fields are marked *