No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
int istheButton = 2; | |||
int theMotoris = 13; | int theMotoris = 13; | ||
int theStatusis = 1; | int theStatusis = 1; | ||
Line 27: | Line 27: | ||
<small>Original file created with Fritzing. | <small>Original file created with Fritzing. | ||
Filetype unfortunately not supported. | Filetype unfortunately not supported. | ||
Sendable via E-Mail if wished. </small> | Sendable via [User:Hier|E-Mail] if wished. </small> |
Revision as of 06:53, 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 like it's not then perfect if you cannot add something anymore it is if you cannot leave something out. }
Circuit
Original file created with Fritzing.
Filetype unfortunately not supported.
Sendable via [User:Hier|E-Mail] if wished.