test0313

sMotor.h

Committer:
lpisuseful
Date:
2019-03-14
Revision:
1:0ea5b11066c5
Parent:
0:4b3b9e047ce3
Child:
2:9b9db9c1c097

File content as of revision 1:0ea5b11066c5:

/*
############################################
##           sMotor v0.1 Library          ##
##          created by Samuel Matildes    ##
############################################
        ---- sam.naeec@gmail.com -----
This library was made for 4-Phase Stepper Motors
I don't take any resposability for the damage caused to your equipment.

*/
#ifndef MBED_SMOTOR_H
#define MBED_SMOTOR_H

#include "mbed.h"

class sMotor {
public:

    sMotor(PinName A0, PinName A1, PinName A2, PinName A3); //motor constructor

    void step(int num_steps, int direction, int speed);
    void anticlockwise();
    void clockwise();
    void setzerostep(int SetZeroSteps, int direction, int speed);
    void SetZeroClockWise(int setzeroclockwise);
    


private:

    DigitalOut _A0;
    DigitalOut _A1;
    DigitalOut _A2;
    DigitalOut _A3;
    //DigitalIn _D11;
    //DigitalOut _D12;


};

#endif