Slow version

Dependencies:   mbed

Fork of SunflowerMach1 by Milan Draganic

Committer:
mdraganic
Date:
Fri Nov 08 19:09:47 2013 +0000
Revision:
0:7447b8021b33
Child:
1:2e7d4aa6e79e
first ini

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mdraganic 0:7447b8021b33 1 #ifndef MOTOR_H
mdraganic 0:7447b8021b33 2 #define MOTOR_H
mdraganic 0:7447b8021b33 3
mdraganic 0:7447b8021b33 4 #include "mbed.h"
mdraganic 0:7447b8021b33 5
mdraganic 0:7447b8021b33 6 #define motorDriveTime 1000 // vrijeme koje se motor kreće, u milisekundama.
mdraganic 0:7447b8021b33 7
mdraganic 0:7447b8021b33 8 class Motor {
mdraganic 0:7447b8021b33 9
mdraganic 0:7447b8021b33 10 private:
mdraganic 0:7447b8021b33 11 DigitalOut positiveOut, negativeOut;
mdraganic 0:7447b8021b33 12 void move();
mdraganic 0:7447b8021b33 13 short direction;
mdraganic 0:7447b8021b33 14
mdraganic 0:7447b8021b33 15 public:
mdraganic 0:7447b8021b33 16 Motor(PinName, PinName);
mdraganic 0:7447b8021b33 17 void movePositive();
mdraganic 0:7447b8021b33 18 void moveNegative();
mdraganic 0:7447b8021b33 19 void stop();
mdraganic 0:7447b8021b33 20
mdraganic 0:7447b8021b33 21
mdraganic 0:7447b8021b33 22 };
mdraganic 0:7447b8021b33 23
mdraganic 0:7447b8021b33 24 #endif