Arduino Blink Example is one the most basic example in Arduino Library. This is basically used for testing a particular Arduino whether it is working correctly or not. It is most basic and very first example which is taught in Arduino tutorials.
In this example, a LED which is embedded on the Arduino Board
starts blinking in the interval of 1 second. This LED can be found near Digit
Pin – 13. This LED is directly connected to Pin – 13, so we can directly access
this LED via Pin – 13.
Now, let’s check the code of the Blink Example and see how
it works.
This is the Blink Example Project which you can find in File->Examples->Basic->Blink.
This is the code which do all the magic in the Arduino
Board.
This block (function) of code defines different pin functionality
as INPUT or OUTPUT.
This LED_BUILTIN is nothing but the Pin – 13 built–in LED,
which can be directly accessed by Pin-13 itself.
This HIGH is nothing but ON or 1 (one) in Binary language
which means pass the current.
This LOW is nothing but OFF or 0 (zero) in Binary language
which means don’t pass the current.
Here we are waiting for 1000 ms which is equivalent to 1
second.
Like this the LED is ON for 1 second.
And like this the LED is OFF for 1 second.
This block (function) of code create a loop and make this ON
and OFF of LED continuous, which is visible us as LED BLINKING.
No comments:
Post a Comment