circuito tres leds
// El pin 13 conectado un LED en la mayoria de tarjetas arduino.
// give it a name:
int led = 8;
int led2 = 12;
int led3 = 6;
// la rutina de configuracion corre solo una vez:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(111); // wait for 0.2 second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(777); // wait for 0.75 second
digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for 0.5 second
digitalWrite(led2, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait for 0.5 second
digitalWrite(led3,HIGH); // turn the LED on (HIGH is the voltage level)
delay(777); // wait for 0.25 second
digitalWrite(led3, LOW); // turn the LED off by making the voltage LOW
delay(333); // wait for 0.75 second

Comentarios
Publicar un comentario