FORUM

 



Booking.com Gewinnspiel



Arduino digital output

Das ist das Basis "hello world" Programm für Arduino. Es schaltet ein LED in Sekundentakt ein und aus

 

/*
LED Eine Sekunde an, eine Sekunde aus 
  
 Note: On most Arduino boards, there is already an LED 
 on the board  connected to pin 13, so you don't need a
 ny extra components for this example.
*/
int ledPin =  13; // Benutzt wird Pin 13 am Arduino Board

void setup()  
{         
 pinMode(ledPin, OUTPUT); // Pin 13 als Output festlegen     
}

// loop() solange Arduino mit Strom versorgt wird
void loop()                     
{
  digitalWrite(ledPin, HIGH);   // LED einschalten
  delay(1000);                  // 1 Sekunde Pause
  digitalWrite(ledPin, LOW);    // LED ausschalten
  delay(1000);                  // 1 Sekunde Pause
}

 

 

SCHALTPLAN:

 

STECKPLAN:

content copyright © 2004 - 2019, Gerhard Lentschik. Nachdruck und Weiterverbreitung, auch auszugsweise, nur mit Genehmigung.
Aufrufe seit 16.6.2011:
1385875
Impressum   Datenschutz
ss