Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: kisoken_PenPlotter
SPM.h
00001 00002 #ifndef __SPM_H__ 00003 #define __SPM_H__ 00004 00005 #include "mbed.h" 00006 00007 00008 //#define __P1_EXCITATION__ 00009 #define __P12_EXCITATION__ 00010 //#define __P2_EXCITATION__ 00011 00012 00013 class stepMotor{ 00014 00015 public: 00016 00017 stepMotor(PinName pinName_A , PinName pinName_nA , PinName pinName_B , PinName pinName_nB); 00018 00019 ~stepMotor(); 00020 00021 void oneStep(bool direction); 00022 00023 void free(); 00024 00025 void lock(); 00026 00027 private: 00028 00029 DigitalOut pin_A; 00030 DigitalOut pin_nA; 00031 DigitalOut pin_B; 00032 DigitalOut pin_nB; 00033 00034 int state; 00035 00036 }; 00037 00038 00039 #endif
Generated on Tue Aug 30 2022 11:26:51 by
1.7.2