Wenn-Programm

Aus RMG-Wiki
Wechseln zu: Navigation, Suche
void setup()
{
  pinMode(13, OUTPUT);
  pinMode(7, INPUT);
}

void loop()
{
  if (digitalRead(7) == HIGH)
  {
    digitalWrite(13, HIGH);
  }
  if (digitalRead (7) == LOW)
  {
    digitalWrite(13,LOW);
  }
}