SHARE
TWEET

5 LED villogtatása sorban Arduinoval

Zoff76 Jan 24th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // 5 led villogtatása egymás után
  2.  
  3. void setup()
  4. {
  5.  
  6.   for (int i = 2; i < 7; i++)
  7.   {
  8.     pinMode (i, OUTPUT); //2,3,4,5,6 Pinek kimenetek
  9.   }
  10.  
  11. }
  12.  
  13. void loop() {
  14.  
  15.   for (int i = 2; i < 7; i++) //egyesével fel
  16.   {
  17.     delay (500);
  18.     digitalWrite (i, HIGH);
  19.   }
  20.  
  21.   for (int i = 7; i > 1; i--) //egyesével le
  22.   {
  23.     delay (500);
  24.     digitalWrite (i, LOW);
  25.   }
  26.  
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top