Willkommen auf unserem Seminar-Blog

Immer auf dem aktuellen Stand bleiben

Dieser Seminar-Blog befindet sich noch im Aufbau und wird in den kommenden Tagen entsprechend verfeinert.

Member Login

Lost your password?

Registration is closed

Sorry, you are not allowed to register by yourself on this site!

You must either be invited by one of our team member or request an invitation by email at viad.info {at} zhdk {dot} ch.

Lauflicht

17. November 2011

Knight Rider style LED leuchte.
#define LED_PIN13 13
#define LED_PIN12 12
#define LED_PIN11 11
#define LED_PIN10 10
#define LED_PIN9 9
#define LED_PIN8 8
#define LED_PIN7 7
#define LED_PIN6 6
#define LED_PIN5 5
#define LED_PIN4 4

int timer = 30;
int timer2 = 5;


void setup ()
{
  pinMode(LED_PIN13, OUTPUT); // definition des LED ausgang
  pinMode(LED_PIN12, OUTPUT);
  pinMode(LED_PIN11, OUTPUT);
  pinMode(LED_PIN10, OUTPUT);
  pinMode(LED_PIN9, OUTPUT);
  pinMode(LED_PIN8, OUTPUT);
  pinMode(LED_PIN7, OUTPUT);
  pinMode(LED_PIN6, OUTPUT);
  pinMode(LED_PIN5, OUTPUT);
  pinMode(LED_PIN4, OUTPUT);
}

void loop()
{
  
 digitalWrite(LED_PIN13, HIGH);
 delay(timer);
 digitalWrite(LED_PIN13, LOW);
 delay(timer);
 
 digitalWrite(LED_PIN12, HIGH);
 delay(timer);
 digitalWrite(LED_PIN12, LOW);
 delay(timer); 

 digitalWrite(LED_PIN11, HIGH);
 delay(timer);
 digitalWrite(LED_PIN11, LOW);
 delay(timer);  

 digitalWrite(LED_PIN10, HIGH);
 delay(timer);
 digitalWrite(LED_PIN10, LOW);
 delay(timer2);  

 digitalWrite(LED_PIN9, HIGH);
 delay(timer);
 digitalWrite(LED_PIN9, LOW);
 delay(timer2);  

 digitalWrite(LED_PIN8, HIGH);
 delay(timer);
 digitalWrite(LED_PIN8, LOW);
 delay(timer2);  

 digitalWrite(LED_PIN7, HIGH);
 delay(timer);
 digitalWrite(LED_PIN7, LOW);
 delay(timer);  

 digitalWrite(LED_PIN6, HIGH);
 delay(timer);
 digitalWrite(LED_PIN6, LOW);
 delay(timer);  

 digitalWrite(LED_PIN5, HIGH);
 delay(timer);
 digitalWrite(LED_PIN5, LOW);
 delay(timer);  

 digitalWrite(LED_PIN4, HIGH);
 delay(timer);
 digitalWrite(LED_PIN4, LOW);
 delay(timer); 

 digitalWrite(LED_PIN5, HIGH);
 delay(timer);
 digitalWrite(LED_PIN5, LOW);
 delay(timer2); 

 digitalWrite(LED_PIN6, HIGH);
 delay(timer);
 digitalWrite(LED_PIN6, LOW);
 delay(timer); 

 digitalWrite(LED_PIN7, HIGH);
 delay(timer);
 digitalWrite(LED_PIN7, LOW);
 delay(timer); 

 digitalWrite(LED_PIN8, HIGH);
 delay(timer);
 digitalWrite(LED_PIN8, LOW);
 delay(timer); 

 digitalWrite(LED_PIN9, HIGH);
 delay(timer);
 digitalWrite(LED_PIN9, LOW);
 delay(timer); 

 digitalWrite(LED_PIN10, HIGH);
 delay(timer);
 digitalWrite(LED_PIN10, LOW);
 delay(timer); 

 digitalWrite(LED_PIN11, HIGH);
 delay(timer);
 digitalWrite(LED_PIN11, LOW);
 delay(timer); 

 digitalWrite(LED_PIN12, HIGH);
 delay(timer);
 digitalWrite(LED_PIN12, LOW);
 delay(timer); 

}