Daniel Vizcaya / Mbed OS 04_RTOS_Embebidos
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers stepmotor.h Source File

stepmotor.h

00001 #ifndef STEP_MOTOR_H
00002 #define STEP_MOTOR_H
00003  
00004 #include "mbed.h"
00005  
00006 class stepmotor {
00007 public:
00008  
00009     stepmotor(PinName in1, PinName in2, PinName in3, PinName in4); 
00010     void step(uint32_t num_steps,bool cw);
00011     void set_speed(int speed);
00012     uint32_t get_speed();
00013 private:
00014     BusOut motor_out;
00015     uint32_t motorSpeed; 
00016     int8_t nstep;
00017     
00018     void move();
00019 };
00020  
00021 #endif