picolo

Fork of Step_Motor by Steven Ortiz

Step_Motor.h

Committer:
pablolopez89
Date:
2018-06-02
Revision:
5:d92004b211c9
Parent:
3:ec3add9f1351

File content as of revision 5:d92004b211c9:

#ifndef STEP_MOTOR_H
#define STEP_MOTOR_H
 
#include "mbed.h"
 
class stepmotor {
public:
 
    stepmotor(PinName in1, PinName in2, PinName in3, PinName in4, PinName in5,PinName in6, PinName in7, PinName in8); 
    void step(uint32_t num_steps,uint8_t cw);
    void set_speed(int speed);
    uint32_t get_speed();
private:
    BusOut motor_out;
    uint32_t motorSpeed; 
    int32_t nstep,nstep2;
    uint8_t add;
    void move();
};
 
#endif