From 3abd9be011dae55ccdf83a0a1155c063e668afeb Mon Sep 17 00:00:00 2001 From: Duarte Milhinhos Date: Sat, 13 Apr 2019 14:58:15 +0100 Subject: [PATCH] First commit --- motor.ino | 20 ++++++++++++++++++++ readme.md | 0 2 files changed, 20 insertions(+) create mode 100644 motor.ino create mode 100644 readme.md diff --git a/motor.ino b/motor.ino new file mode 100644 index 0000000..8226024 --- /dev/null +++ b/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); + +} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e69de29