Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos TextLCD
Diff: Stepper_Motor/STEPPER_MOTOR.cpp
- Revision:
- 19:384642f39496
- Parent:
- 18:3523660f3930
- Child:
- 23:07a368f2cdb1
--- a/Stepper_Motor/STEPPER_MOTOR.cpp Tue Feb 12 10:12:08 2019 +0000 +++ b/Stepper_Motor/STEPPER_MOTOR.cpp Tue Feb 12 11:28:07 2019 +0000 @@ -31,28 +31,32 @@ this->pin3 = 0; this->pin4 = 1; //mystep=1; - wait_us(1000); + Thread::wait(1); + //wait_us(1000); //printf("FOR LOOP! step value is=%d %d\n\r",mystep,x); this->pin1 = 0; this->pin2 = 1; this->pin3 = 1; this->pin4 = 0; //mystep=2; - wait_us(1000); + Thread::wait(1); + //wait_us(1000); //printf("FOR LOOP! step value is=%d %d\n\r",mystep,x); this->pin1 = 1; this->pin2 = 0; this->pin3 = 1; this->pin4 = 0; //mystep=3; - wait_us(1000); + Thread::wait(1); + //wait_us(1000); //printf("FOR LOOP! step value is=%d %d\n\r",mystep,x); this->pin1 = 1; this->pin2 = 0; this->pin3 = 0; this->pin4 = 1; //mystep=4; - wait_us(1000); + Thread::wait(1); + //wait_us(1000); _Steps_Done = _Steps_Done +1; /* printf("FOR LOOP! step value is=%d %d\n\r",mystep,x);