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.
Diff: main.cpp
- Revision:
- 10:92350e68d5ee
- Parent:
- 9:b7f0cf7e9079
- Child:
- 11:6b3570e525a1
--- a/main.cpp Tue Apr 23 15:08:52 2019 +0000
+++ b/main.cpp Tue Apr 23 15:35:23 2019 +0000
@@ -436,7 +436,7 @@
In [ 0 ] = analog_value0.read(); // Converts and read the analog input value (value from 0.0 to 1.0)
//printf(" X = %.04f \n", In[0]);
- if ( In [ 0 ] > 0.5 ){
+ if ( In [ 0 ] > 0.6 ){
steppeer_dir = 1;
wait_us( 1 );
@@ -452,7 +452,7 @@
}
}
- if ( In [ 0 ] < 0.5 ){
+ if ( In [ 0 ] < 0.3 ){
steppeer_dir2 = 1;
wait_us( 1 );
@@ -472,7 +472,7 @@
In [ 1 ] = analog_value1.read(); // Converts and read the analog input value (value from 0.0 to 1.0)
//printf(" Y = %.04f \n", In[0]);
- if (In [ 1 ] > 0.5 ){
+ if (In [ 1 ] > 0.6 ){
steppeer_dir = 1 ;
steppeer_dir2 = 0 ;
@@ -490,7 +490,7 @@
}
}
- if ( In [ 1 ] < 0.5 ){
+ if ( In [ 1 ] < 0.3 ){
steppeer_dir = 0 ;
steppeer_dir2 = 1 ;
@@ -509,8 +509,6 @@
}
- wait_us ( 1 );
-
if ( command.readable () == 1 ){
uint8_t l1, l2 ;
@@ -524,7 +522,9 @@
Exit = 1 ;
}
}
-
+
+ wait_us ( 1 );
+
}
}