zoranzoki21

Vežba 1 - Semafor

Dec 4th, 2020
472
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup()
  2. {
  3.   pinMode(10, OUTPUT);
  4.   pinMode(9, OUTPUT);
  5.   pinMode(8, OUTPUT);
  6.   pinMode(7, OUTPUT);
  7.   pinMode(6, OUTPUT);
  8. }
  9.  
  10. void loop()
  11. {
  12.   digitalWrite(10, HIGH);
  13.   digitalWrite(6, HIGH);
  14.   delay(10000); // Wait for 10000 millisecond(s)
  15.   //
  16.   digitalWrite(10, LOW);
  17.   digitalWrite(6, LOW);
  18.   digitalWrite(9, HIGH);
  19.   digitalWrite(8, HIGH);
  20.   digitalWrite(7, HIGH);
  21.   delay(2000); // wait for 2000 millisecond(s)
  22.   //
  23.   digitalWrite(9, LOW);
  24.   digitalWrite(8, LOW);
  25.   digitalWrite(7, LOW);
  26.   digitalWrite(8, HIGH);
  27.   digitalWrite(7, HIGH);
  28.   delay(10000); // wait for 10000 millisecond(s)
  29.   //
  30.   digitalWrite(9, LOW);
  31.   digitalWrite(8, LOW);
  32.   digitalWrite(7, LOW);
  33.   digitalWrite(9, HIGH);
  34.   digitalWrite(7, HIGH);
  35.   delay(2000); // wait for 2000 millisecond(s)
  36. }
RAW Paste Data