Marlon Daniel Quiroga / Mbed 2 deprecated Entrega2crte5

Dependencies:   mbed

Revision:
1:004a27caba52
Parent:
0:5e6b543c1179
Child:
2:0cc71fa2f3fd
diff -r 5e6b543c1179 -r 004a27caba52 main.cpp
--- a/main.cpp	Mon Feb 25 22:49:23 2019 +0000
+++ b/main.cpp	Fri Mar 22 03:14:42 2019 +0000
@@ -33,7 +33,7 @@
 /*INGRESE LA CONFIGURACION DE LOS MOTORES*/
 
 #define INITCMD 0xFF
-#define VELOCITY 5   ///en micro segundos
+#define VELOCITY 500  ///en micro segundos
 
 // definición de las variables globales 
 
@@ -79,23 +79,28 @@
 
 void mover_steper_nema(uint8_t sentido, uint8_t num_pasos){
 
-        uint32_t dpulse=0;
+        uint8_t i = 0;
         
 /* complementar el código necesario */
 
+    
     if (sentido == 1) {
         steppeer_dir = 0;
     } else if (sentido == 0) {
         steppeer_dir = 1;
     }
+    
+    wait_us( 1 );
     /*esperar 650 nsegundo*/
     
     /* complementar el código necesario */
+for ( i= 0 ; i <= num_pasos ; i++){ 
+        printf ("%x",i );       
         stepper_step=1;
         wait_us(VELOCITY);
         stepper_step=0;
         wait_us(VELOCITY);
-
+    }
 
 }