Browse Source

First commit

master
Duarte Milhinhos 2 years ago
commit
3abd9be011
  1. 20
      motor.ino
  2. 0
      readme.md

20
motor.ino

@ -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);
}

0
readme.md

Loading…
Cancel
Save