test0313
Embed:
(wiki syntax)
Show/hide line numbers
sMotor.h
00001 /* 00002 ############################################ 00003 ## sMotor v0.1 Library ## 00004 ## created by Samuel Matildes ## 00005 ############################################ 00006 ---- sam.naeec@gmail.com ----- 00007 This library was made for 4-Phase Stepper Motors 00008 I don't take any resposability for the damage caused to your equipment. 00009 00010 */ 00011 #ifndef MBED_SMOTOR_H 00012 #define MBED_SMOTOR_H 00013 00014 #include "mbed.h" 00015 00016 class sMotor { 00017 public: 00018 00019 sMotor(PinName A0, PinName A1, PinName A2, PinName A3); //motor constructor 00020 00021 void step(int num_steps, int direction, int speed); 00022 void anticlockwise(); 00023 void clockwise(); 00024 void setzerostep(int SetZeroSteps, int direction, int speed); 00025 void SetZeroClockWise(); 00026 00027 00028 00029 private: 00030 00031 DigitalOut _A0; 00032 DigitalOut _A1; 00033 DigitalOut _A2; 00034 DigitalOut _A3; 00035 //DigitalIn _D11; 00036 //DigitalOut _D12; 00037 00038 00039 }; 00040 00041 #endif
Generated on Fri Jul 15 2022 15:37:38 by
1.7.2