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 X-NUCLEO-IHM05A1
Revision 11:a7e099ee909e, committed 2018-11-21
- Comitter:
- francesco01
- Date:
- Wed Nov 21 15:52:33 2018 +0000
- Parent:
- 10:2622d1ab5984
- Commit message:
- motore
Changed in this revision
| Exercise_IHM05A1.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Exercise_IHM05A1.cpp Sat Nov 17 14:19:06 2018 +0000
+++ b/Exercise_IHM05A1.cpp Wed Nov 21 15:52:33 2018 +0000
@@ -158,16 +158,7 @@
pc.printf("--> Running the motor backward.\r\n");
motor->run(StepperMotor::BWD);
- while (motor->get_status()!=STEADY) {
- /* Print reached speed to the console in step/s or microsteps/s */
- pc.printf(" Reached Speed: %d microstep/s.\r\n", motor->get_speed());
- wait_ms(50);
- }
- pc.printf(" Reached Speed: %d microstep/s.\r\n", motor->get_speed());
-
- /* Wait for 1 second */
- wait_ms(1000);
-
+
//----- Soft stop required while running
@@ -199,7 +190,7 @@
while (true) {
- if ( Input == 0 )
+ /* if ( Input == 0 )
{
a=a+1;
}
@@ -207,9 +198,9 @@
{
a=0;
- }
+ }*/
- if(a==0)
+ if(myButton==0)
{
/* Request device to go position -3200 */
motor->go_to(150);