linear motor code for ksk

Dependencies:   mbed

LinearMotor.cpp

Committer:
cws8262
Date:
2017-02-25
Revision:
2:81a944155520
Parent:
1:ff295adcca59

File content as of revision 2:81a944155520:

#include "LinearMotor.h"
#include "mbed.h"
Serial pc1(SERIAL_TX, SERIAL_RX);

LinearMotor::LinearMotor(PinName Dir, PinName Pulse, PinName St, PinName Limit)
:dir(Dir), pulse(Pulse), st(St), limit(Limit) 
{
    st.write(1);
    limit.mode(PullUp);
}