Biblioteka za upravljanje bipolarnim step motorom

bmotor.h

Committer:
mario_meh
Date:
2017-02-08
Revision:
0:ccc31f6eba34

File content as of revision 0:ccc31f6eba34:

#ifndef B_MOTOR_H
#define B_MOTOR_H

typedef struct {
    int p_gore;
    int p_dolje;
    bool done;
}BPozicija;

class Bipolar {
    public:
        Bipolar();
        BPozicija b_poz;
        void goreDolje(int y);
        void potez();
        void ciklusSM();
        void startSM();
        void stopSM();
        void enableSM();
    private:
        Ticker b_ticker;
        Timer b_t;
        DigitalOut ENA, IN1, IN2, IN3, IN4, ENB;
};

#endif /* B_MOTOR_H */