Biblioteka za upravljanje bipolarnim step motorom
bmotor.h@0:ccc31f6eba34, 2017-02-08 (annotated)
- Committer:
- mario_meh
- Date:
- Wed Feb 08 08:36:14 2017 +0000
- Revision:
- 0:ccc31f6eba34
zadnje izmjene pred predaju seminarskog zadatka
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mario_meh | 0:ccc31f6eba34 | 1 | #ifndef B_MOTOR_H |
mario_meh | 0:ccc31f6eba34 | 2 | #define B_MOTOR_H |
mario_meh | 0:ccc31f6eba34 | 3 | |
mario_meh | 0:ccc31f6eba34 | 4 | typedef struct { |
mario_meh | 0:ccc31f6eba34 | 5 | int p_gore; |
mario_meh | 0:ccc31f6eba34 | 6 | int p_dolje; |
mario_meh | 0:ccc31f6eba34 | 7 | bool done; |
mario_meh | 0:ccc31f6eba34 | 8 | }BPozicija; |
mario_meh | 0:ccc31f6eba34 | 9 | |
mario_meh | 0:ccc31f6eba34 | 10 | class Bipolar { |
mario_meh | 0:ccc31f6eba34 | 11 | public: |
mario_meh | 0:ccc31f6eba34 | 12 | Bipolar(); |
mario_meh | 0:ccc31f6eba34 | 13 | BPozicija b_poz; |
mario_meh | 0:ccc31f6eba34 | 14 | void goreDolje(int y); |
mario_meh | 0:ccc31f6eba34 | 15 | void potez(); |
mario_meh | 0:ccc31f6eba34 | 16 | void ciklusSM(); |
mario_meh | 0:ccc31f6eba34 | 17 | void startSM(); |
mario_meh | 0:ccc31f6eba34 | 18 | void stopSM(); |
mario_meh | 0:ccc31f6eba34 | 19 | void enableSM(); |
mario_meh | 0:ccc31f6eba34 | 20 | private: |
mario_meh | 0:ccc31f6eba34 | 21 | Ticker b_ticker; |
mario_meh | 0:ccc31f6eba34 | 22 | Timer b_t; |
mario_meh | 0:ccc31f6eba34 | 23 | DigitalOut ENA, IN1, IN2, IN3, IN4, ENB; |
mario_meh | 0:ccc31f6eba34 | 24 | }; |
mario_meh | 0:ccc31f6eba34 | 25 | |
mario_meh | 0:ccc31f6eba34 | 26 | #endif /* B_MOTOR_H */ |