libreria para manejo de easy driver
Fork of stepper by
Revision 3:9c7a33b8a771, committed 2015-05-07
- Comitter:
- oscarvzfz
- Date:
- Thu May 07 23:02:53 2015 +0000
- Parent:
- 2:ad11f550b379
- Commit message:
- ...
Changed in this revision
stepper.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r ad11f550b379 -r 9c7a33b8a771 stepper.cpp --- a/stepper.cpp Wed Nov 03 18:41:28 2010 +0000 +++ b/stepper.cpp Thu May 07 23:02:53 2015 +0000 @@ -28,8 +28,7 @@ // define Library version number #define VERSION 0.3 -// led4, used for testing the direction signal -DigitalOut led4(LED4); + stepper::stepper(PinName clk, PinName dir) : _clk(clk), _dir(dir) { _clk = 0, _dir = 0; @@ -46,7 +45,7 @@ if(i < START_STOP_SPEED) if (--accelspeed == speed) accelspeed ++; if(i > (n_steps-START_STOP_SPEED)) if(++accelspeed == START_STOP_SPEED) accelspeed--; } - _dir = led4 = direction; + _dir = direction; _clk = 1; wait_us(1); _clk = 0;