SHARE
TWEET

Semáforo con luces led (Arduino) (C++)

TomasDm May 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int rojo = 8;
  2. int verde = 10;
  3. int amarillo = 9;
  4.  
  5. void setup () {
  6.   pinMode (8, OUTPUT);
  7.   pinMode (9, OUTPUT);
  8.   pinMode (10, OUTPUT);
  9.  
  10.   }
  11.  
  12. void loop (){
  13.   digitalWrite (rojo, HIGH);
  14.   delay(5000);
  15.   digitalWrite (rojo, LOW);
  16.   digitalWrite (amarillo, HIGH);
  17.   delay(700);
  18.   digitalWrite (amarillo, LOW);
  19.   digitalWrite (verde, HIGH);
  20.   delay(5000);
  21.   digitalWrite (verde, LOW);
  22.   digitalWrite (amarillo, HIGH);
  23.   delay(700);
  24.   digitalWrite (amarillo, LOW);
  25.  
  26.   }
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