Upravljanje unipolasnim motorom
umotor.h
- Committer:
- mario_meh
- Date:
- 2017-01-29
- Revision:
- 0:a3d5b06d790a
- Child:
- 2:b769f13c7523
File content as of revision 0:a3d5b06d790a:
#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 */