IFD:GrundlagenElektronik2011/Project/Code

From Medien Wiki
< IFD:GrundlagenElektronik2011‎ | Project
Revision as of 18:32, 19 August 2012 by Max (talk | contribs) (bitte syntaxhighlight für code verwenden!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
int istheButton = 2; 
  int theMotoris  = 13;   
  int theStatusis = 1;

  void setup() {
  pinMode(theMotoris, OUTPUT);      
  pinMode(istheButton, INPUT );     
  }
  void loop(){
  
  theStatusis = digitalRead(istheButton);
  if (theStatusis == HIGH) {     
   digitalWrite(theMotoris, HIGH);
    delay (5000);
  } else digitalWrite(theMotoris, LOW);
  
  //place for thoughts like it's not then perfect if you cannot add something anymore it is if you cannot leave something out.
  
  }

Circuit

Circuit


Original file created with Fritzing. Sendable via E-Mail if wished.