First commit
This commit is contained in:
commit
3abd9be011
|
@ -0,0 +1,20 @@
|
||||||
|
int pushButton = 2;
|
||||||
|
|
||||||
|
// the transistor which controls the motor will be attached to digital pin 9
|
||||||
|
int motorControl = 3;
|
||||||
|
|
||||||
|
// the setup routine runs once when you press reset:
|
||||||
|
void setup() {
|
||||||
|
// make the pushbutton's pin an input:
|
||||||
|
pinMode(pushButton, INPUT);
|
||||||
|
|
||||||
|
// make the transistor's pin an output:
|
||||||
|
pinMode(motorControl, OUTPUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// the loop routine runs over and over again forever:
|
||||||
|
void loop() {
|
||||||
|
|
||||||
|
analogWrite(motorControl, 0);
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue