esta librería sirve para el control del motor paso a paso.
Embed:
(wiki syntax)
Show/hide line numbers
Step_Motor.h
00001 #ifndef STEP_MOTOR_H 00002 #define STEP_MOTOR_H 00003 00004 #include "mbed.h" 00005 00006 #define NUME_PASOS 45629 00007 #define RADIO_R 50 00008 00009 class stepmotor { 00010 public: 00011 00012 stepmotor(PinName in1, PinName in2, PinName in3, PinName in4,PinName in5, PinName in6, PinName in7, PinName in8); 00013 void step(uint32_t num_steps,uint8_t cw); 00014 void set_speed(int speed); 00015 uint32_t get_speed(); 00016 private: 00017 BusOut motor_out; 00018 uint32_t motorSpeed; 00019 int8_t nstep; 00020 int8_t nstep2; 00021 int8_t ms2; 00022 void move(); 00023 }; 00024 00025 #endif
Generated on Wed Jul 20 2022 16:44:35 by 1.7.2