Controlling digital Output with the Arduino

Aus DL8RDS Wiki
Version vom 7. November 2009, 02:09 Uhr von Dl8rds (Diskussion | Beiträge) (New page: * http://www.arduino.cc/en/Tutorial/Blink int ledPin = 13; // LED connected to digital pin 13 void setup() { // initialize the digital pin as an output: p...)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche
int ledPin =  13;    // LED connected to digital pin 13

void setup() 
{                
  // initialize the digital pin as an output:
  pinMode(ledPin, OUTPUT);     
}

void loop()                   
{
  digitalWrite(ledPin, HIGH);   // set the LED on
  delay(1000);                  // wait for a second
  digitalWrite(ledPin, LOW);    // set the LED off
  delay(1000);                  // wait for a second
}