| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Practica1_cocheFantastico

This version was saved 14 years, 1 month ago View current version     Page history
Saved by cmartinez
on March 4, 2010 at 5:38:41 am
 

COCHE FANTÁSTICO

 

Se tiene que conseguir el mismo efecto de las luces del coche de la serie de tv.

 

Componenentes:

ü     4 Leds

ü     4 R de 220

 

PROGRAMA

 

void setup()   {               

  // initialize the digital pin as an output:

pinMode(11, OUTPUT);    

pinMode(10, OUTPUT);

pinMode(9, OUTPUT);

pinMode(8, OUTPUT);

 

}

 

void loop()                    

{

digitalWrite(11, HIGH);   // set the LED on

delay(250);                  // wait for a second

digitalWrite(11, LOW);

digitalWrite(10, HIGH); // set the LED off

delay(250);

digitalWrite(10, LOW);

digitalWrite(9, HIGH);

delay(250);// wait for a second

digitalWrite(9, LOW);

digitalWrite(8, HIGH);

delay(250);

digitalWrite(8, LOW);

digitalWrite(8, HIGH);

delay(250);

digitalWrite(8, LOW);

digitalWrite(9, HIGH);   // set the LED on

delay(250);                  // wait for a second

digitalWrite(9, LOW);

digitalWrite(10, HIGH); // set the LED off

delay(250);

digitalWrite(10, LOW);

digitalWrite(11, HIGH);

delay(250);// wait for a second

digitalWrite(11, LOW);

}

 

Fotografía de las conexiones y del funcionamiento

 

 

 

 

Comments (0)

You don't have permission to comment on this page.