Matthew Else / StepperMotor

Dependents:   tes_stepper Test_all

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Stepper.h Source File

Stepper.h

00001 #ifndef MBED_STEPPER_H
00002 #define MBED_STEPPER_H
00003 #endif
00004 
00005 #include "mbed.h"
00006 
00007 class stepper
00008 {
00009 public:
00010     stepper(PinName _en, PinName ms1, PinName ms2, PinName ms3, PinName _stepPin, PinName dir);
00011     void step(int microstep, int dir, float speed);
00012     void enable();
00013     void disable();
00014 private:
00015     DigitalOut en;
00016     BusOut microstepping;
00017     DigitalOut stepPin;
00018     DigitalOut direction;
00019 };