eka sinambela
/
mbed_stepper_motors
stepper mottor for pumps
DRV8825.h@2:5b26538ab9ab, 2016-06-20 (annotated)
- Committer:
- ekasinambela
- Date:
- Mon Jun 20 13:44:12 2016 +0000
- Revision:
- 2:5b26538ab9ab
- Parent:
- 0:29fc24ce612f
i changed the function, now its good; in the main function the initialization of the pumps is written
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ekasinambela | 0:29fc24ce612f | 1 | #ifndef MBED_DRV8825_H |
ekasinambela | 0:29fc24ce612f | 2 | #define MBED_DRV8825_H |
ekasinambela | 0:29fc24ce612f | 3 | #endif |
ekasinambela | 0:29fc24ce612f | 4 | |
ekasinambela | 0:29fc24ce612f | 5 | #include "mbed.h" |
ekasinambela | 0:29fc24ce612f | 6 | |
ekasinambela | 0:29fc24ce612f | 7 | class DRV8825 |
ekasinambela | 0:29fc24ce612f | 8 | { |
ekasinambela | 0:29fc24ce612f | 9 | public: |
ekasinambela | 0:29fc24ce612f | 10 | DRV8825(PinName _en, PinName m0, PinName m1, PinName m2, PinName _stepPin, PinName dir); |
ekasinambela | 0:29fc24ce612f | 11 | void settings(float microstep, int dir, float speed); |
ekasinambela | 0:29fc24ce612f | 12 | void enable(); |
ekasinambela | 0:29fc24ce612f | 13 | void disable(); |
ekasinambela | 0:29fc24ce612f | 14 | DigitalOut stepPin; |
ekasinambela | 0:29fc24ce612f | 15 | DigitalOut direction; |
ekasinambela | 0:29fc24ce612f | 16 | private: |
ekasinambela | 0:29fc24ce612f | 17 | DigitalOut en; |
ekasinambela | 0:29fc24ce612f | 18 | BusOut microstepping; |
ekasinambela | 0:29fc24ce612f | 19 | //DigitalOut stepPin; |
ekasinambela | 0:29fc24ce612f | 20 | //DigitalOut direction; |
ekasinambela | 0:29fc24ce612f | 21 | }; |