![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
para el ventilador
Diff: stepper_motor_driver.h
- Revision:
- 0:9d0b9785d3d6
- Child:
- 1:aa5df1878126
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stepper_motor_driver.h Sat Apr 11 22:53:05 2020 +0000 @@ -0,0 +1,26 @@ +#ifndef STEPPER_MOTOR_DRIVER_H_ +#define STEPPER_MOTOR_DRIVER_H_ + +#include "mbed.h" + + +#define STEPPER_PULSE_PERIOD 0.0002f +#define STEPPER_PULSE_DUTY_CYCLE 0.5f +#define STEPPER_MOTOR_TOTAL_STEPS 6000 + +#define STEPPER_MOTOR_GO_HOME 0 +#define STEPPER_MOTOR_GO_AHEAD 0 + + +/* Object declaration */ +extern PwmOut stepper_pulse; +extern DigitalOut stepper_en; +extern DigitalOut stepper_dir; + +extern uint8_t stepper_motor_state; + +void Stepper_Motor_Go_Home(void); +void Stepper_Motor_Go_Ahead(void); + + +#endif \ No newline at end of file