akiyoshi oguro
/
Nucleo_Hall_BLDC_rpm_2
Trapezoid Drive Ver2
Diff: main.cpp
- Revision:
- 4:842fce070123
- Parent:
- 3:7a89b67efc84
diff -r 7a89b67efc84 -r 842fce070123 main.cpp --- 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);