» Topics » DIY ideas »Flashing LED (Arduino)

Flashing LED (Arduino)

Hello, today we will look at how to program Arduino blinking LED.
We will need:
Arduino x1 (you can also use analogues)

LED x1 (color to your taste)

resistor x1 (200 - 220 ohms)

The program on the computer (it can be downloaded on the official website)

USB cable

We connect the short leg of the LED to the 13th output in your Arduino

Connect 1 leg of the resistor to the ground (GND)

Connect 1 leg of the resistor and the long leg of the LED

Here we have to get such a design


Now let's get started!
You must copy this sketch and paste it into the program.

void setup () {
pinMode (13, OUTPUT);
}
void loop () {
digitalWrite (13, HIGH);
delay (1000); this is the time when the LED is on and can be changed
digitalWrite (13, LOW);
delay (1000); // this is the time when the LED is off and can be changed
}
As a result, your LED should be on!
Question \ topic is automatically published in the social. site network - stay tuned for answers there:

Suitable for topic

Related topics

Add a comment

    • smilesmilesxaxaokdontknowyahoonea
      bossscratchfoolyesyes-yesaggressivesecret
      sorrydancedance2dance3pardonhelpdrinks
      stopfriendsgoodgoodgoodwhistleswoontongue
      smokeclappingcraydeclarederisivedon-t_mentiondownload
      heatirefullaugh1mdameetingmoskingnegative
      not_ipopcornpunishreadscarescaressearch
      tauntthank_youthisto_clueumnikacuteagree
      badbeeeblack_eyeblum3blushboastboredom
      censoredpleasantrysecret2threatenvictoryyusun_bespectacled
      shokrespektlolprevedwelcomekrutoyya_za
      ya_dobryihelperne_huliganne_othodifludbanclose

We advise you to read:

Hand it for the smartphone ...