Hall Sensor 6step BLDC

Dependencies:   mbed mbed-rtos

Revision:
3:842fce070123
Parent:
2:7a89b67efc84
--- a/main.cpp	Sat Jun 08 03:23:13 2019 +0000
+++ b/main.cpp	Sat Jun 08 03:27:32 2019 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 #include "rtos.h"
 
-unsigned int q=0,r=0,s=0,START=8;//8
+unsigned int q=0,r=0,s=0,START=20;//8
 
 PwmOut mypwmA(PA_8); //PWM_OUT 
 PwmOut mypwmB(PA_9); //PWM_OUT 
@@ -98,7 +98,7 @@
        uT.start();
        
  if((Vr_adc>0.15f)&&(q==0)){     
-  while(q<50){   
+  while(q<10){   
     
     mypwmA.write(0.5f);  //0.5
     mypwmB.write(0.0);