No edit summary |
No edit summary |
||
| Line 18: | Line 18: | ||
} | } | ||
[[File:PHCircuit.png]] | [[File:PHCircuit.png|130px|Circuit]] | ||
<small> Es ist nicht dann perfekt, wenn man noch etwas hinzufügen könnte, es ist erst dann perfekt, wenn man nichts mehr weglassen kann!</small> | <small> Es ist nicht dann perfekt, wenn man noch etwas hinzufügen könnte, es ist erst dann perfekt, wenn man nichts mehr weglassen kann!</small> | ||
Revision as of 06:25, 31 March 2012
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.
}
Es ist nicht dann perfekt, wenn man noch etwas hinzufügen könnte, es ist erst dann perfekt, wenn man nichts mehr weglassen kann!