ユニポーラステッピングモーター駆動用ライブラリ
Dependents: kisoken_PenPlotter
Diff: SPM.h
- Revision:
- 0:3e978f6d03d9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SPM.h Thu Aug 03 06:49:26 2017 +0000 @@ -0,0 +1,39 @@ + +#ifndef __SPM_H__ +#define __SPM_H__ + +#include "mbed.h" + + +//#define __P1_EXCITATION__ +#define __P12_EXCITATION__ +//#define __P2_EXCITATION__ + + +class stepMotor{ + +public: + + stepMotor(PinName pinName_A , PinName pinName_nA , PinName pinName_B , PinName pinName_nB); + + ~stepMotor(); + + void oneStep(bool direction); + + void free(); + + void lock(); + +private: + + DigitalOut pin_A; + DigitalOut pin_nA; + DigitalOut pin_B; + DigitalOut pin_nB; + + int state; + +}; + + +#endif \ No newline at end of file