A simple stepper motor driver library, supporting micro-stepping drivers such as the Pololu A4988 stepper driver carrier or the Sparkfun EasyDriver.

Dependents:   Robot2016_2-0_STATIC Robot2016_2-0

Fork of StepperMotor by Matthew Else

Committer:
sype
Date:
Wed Apr 13 11:26:35 2016 +0000
Revision:
2:1cec7e9117f2
Parent:
1:e34729a7567f
Child:
3:c7011e72f0c7
Impl?mentation de tous les dispositifs du robot

Who changed what in which revision?

UserRevisionLine numberNew contents of line
melse 0:52fb09e87581 1 #ifndef MBED_STEPPER_H
melse 0:52fb09e87581 2 #define MBED_STEPPER_H
melse 0:52fb09e87581 3 #endif
melse 0:52fb09e87581 4
melse 0:52fb09e87581 5 #include "mbed.h"
sype 2:1cec7e9117f2 6 #define DELAY 0.007
melse 0:52fb09e87581 7
sype 1:e34729a7567f 8 class Stepper
melse 0:52fb09e87581 9 {
melse 0:52fb09e87581 10 public:
sype 1:e34729a7567f 11 Stepper(PinName _en, PinName _stepPin, PinName dir);
sype 1:e34729a7567f 12 void step(int number, int dir, float speed);
melse 0:52fb09e87581 13 void enable();
melse 0:52fb09e87581 14 void disable();
melse 0:52fb09e87581 15 private:
melse 0:52fb09e87581 16 DigitalOut en;
melse 0:52fb09e87581 17 DigitalOut stepPin;
melse 0:52fb09e87581 18 DigitalOut direction;
melse 0:52fb09e87581 19 };