Upravljanje unipolasnim motorom

Revision:
0:a3d5b06d790a
Child:
2:b769f13c7523
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/umotor.h	Sun Jan 29 23:53:10 2017 +0000
@@ -0,0 +1,34 @@
+#ifndef STEPER_H
+#define STEPER_H
+
+#define ARRAY_SIZE(x)  (sizeof(x) / sizeof(*x))
+#define BROJ_KORAKA 50
+
+class Steper {
+    
+    public:
+        Steper();
+        void stepper_step();
+        void timer_isr();
+        void u_motor();
+        
+    private:
+        void pboneCallback();
+        void pbtwoCallback();
+        void togglerOff();
+        void togglerRed();
+        DigitalOut ledSec;        
+        DigitalOut riseL;
+        DigitalOut fallL; 
+        InterruptIn pbone;
+        InterruptIn pbtwo;
+        Timer t;
+        Ticker toggler;
+        Ticker led;
+        Timeout detachToggler;
+        DigitalOut coil1, coil2, coil3, coil4;
+        
+
+};
+
+#endif /* STEPER_H */
\ No newline at end of file